Test kwargs for Airflow function call
✓ Published0🌍 Public
Aadkdev
Last edited Sep 21, 2021
Created on Sep 21, 2021
This example demonstrates how to test keyword arguments for an Airflow function call by passing an `execution_date` and `next_execution_date` to a test function. The code uses `pendulum.today()` to compute yesterday’s and today’s dates, which are then assigned to the `kwargs` dictionary and unpacked into `test_fn(**kwargs)`. It highlights a simple pattern for validating that a function accepts the expected Airflow context parameters, with `exit()` indicating the script ends after the call.
AI-generated description