Mulai sekarangMulai gratis

Unit testing a task function

The key to unit testing Airflow code is extracting the business logic from @task functions into standalone Python functions that can be tested without running Airflow. Your team has done this with the clean_record function in dags/data_cleaning.py, which strips whitespace from names and lowercases emails.

You'll complete the unit tests for this function.

Latihan ini merupakan bagian dari kursus

Building Data Pipelines with Airflow

Lihat Kursus

Latihan interaktif langsung

Ubah teori menjadi aksi dengan salah satu latihan interaktif kami

Mulai latihan