From 6ff618f636bd89248a94c87a2df8252e13712a84 Mon Sep 17 00:00:00 2001 From: Pavan Kumar Date: Sun, 3 Nov 2024 14:50:28 +0000 Subject: [PATCH] update test case with parameter --- .../standard/test_module_redirect_finder.py | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/providers/tests/standard/test_module_redirect_finder.py b/providers/tests/standard/test_module_redirect_finder.py index fcff2cf15622f..61824df971e82 100644 --- a/providers/tests/standard/test_module_redirect_finder.py +++ b/providers/tests/standard/test_module_redirect_finder.py @@ -26,7 +26,22 @@ @pytest.mark.skipif(not AIRFLOW_V_3_0_PLUS, reason="Valid for Airflow 3.0+ only") class TestModuleRedirectFinder: def test_module_redirect_finder_for_old_location(self): - from airflow import module_redirects_references + module_redirects_references: dict[str, str] = { + "airflow.operators.python": "airflow.providers.standard.operators.python", + "airflow.operators.bash": "airflow.providers.standard.operators.bash", + "airflow.operators.datetime": "airflow.providers.standard.operators.datetime", + "airflow.operators.weekday": "airflow.providers.standard.operators.weekday", + "airflow.sensors.bash": "airflow.providers.standard.sensors.bash", + "airflow.sensors.date_time": "airflow.providers.standard.sensors.date_time", + "airflow.sensors.python": "airflow.providers.standard.sensors.python", + "airflow.sensors.time": "airflow.providers.standard.sensors.time", + "airflow.sensors.time_delta": "airflow.providers.standard.sensors.time_delta", + "airflow.sensors.weekday": "airflow.providers.standard.sensors.weekday", + "airflow.hooks.filesystem": "airflow.providers.standard.hooks.filesystem", + "airflow.hooks.package_index": "airflow.providers.standard.hooks.package_index", + "airflow.hooks.subprocess": "airflow.providers.standard.hooks.subprocess", + "airflow.utils.python_virtualenv": "airflow.providers.standard.utils.python_virtualenv", + } for old_module, new_module in module_redirects_references.items(): try: