-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
39 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
""" | ||
Airflow API (Stable) | ||
Apache Airflow management API. # noqa: E501 | ||
The version of the OpenAPI document: 1.0.0 | ||
Contact: zach.z.liu@gmail.com | ||
Generated by: https://openapi-generator.tech | ||
""" | ||
|
||
import logging | ||
|
||
from test.integration.conftest import BCOLORS | ||
|
||
import pytest | ||
|
||
from airflow_python_sdk.model.time_delta import TimeDelta | ||
|
||
@pytest.mark.parametrize( | ||
"test_input, expected", | ||
[ | ||
(["example_bash_operator"], TimeDelta( | ||
type="TimeDelta", | ||
days=0, | ||
seconds=3600, | ||
microseconds=0, | ||
)), | ||
(["test_glue_partitions_sensor"], None), | ||
], | ||
) | ||
def test_get_dag(dag_api_setup, test_input, expected): | ||
"""Test the /dags/{dag_id} API EP""" | ||
dag_id, = test_input | ||
api_response = dag_api_setup.get_dag_details( | ||
dag_id=dag_id, | ||
) | ||
logging.getLogger().info("%s", api_response) | ||
print(f"{BCOLORS.OKGREEN}OK{BCOLORS.ENDC}") | ||
assert api_response.dag_run_timeout == expected |