From 1d5e77542ded24a4d7f1518c5f74fe576b7b68fa Mon Sep 17 00:00:00 2001 From: boraberke Date: Fri, 5 Jul 2024 20:09:34 +0300 Subject: [PATCH] Resolve deprecations in `serialization` tests --- tests/deprecations_ignore.yml | 4 ---- tests/serialization/test_dag_serialization.py | 7 ++++++- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/tests/deprecations_ignore.yml b/tests/deprecations_ignore.yml index dfe9ca98211be..35620e6417f4c 100644 --- a/tests/deprecations_ignore.yml +++ b/tests/deprecations_ignore.yml @@ -27,10 +27,6 @@ - tests/models/test_xcom.py::TestXCom::test_set_serialize_call_old_signature -# Serialization -- tests/serialization/test_dag_serialization.py::TestStringifiedDAGs::test_custom_dep_detector - - # WWW - tests/www/api/experimental/test_dag_runs_endpoint.py::TestDagRunsEndpoint::test_get_dag_runs_success - tests/www/api/experimental/test_dag_runs_endpoint.py::TestDagRunsEndpoint::test_get_dag_runs_success_with_capital_state_parameter diff --git a/tests/serialization/test_dag_serialization.py b/tests/serialization/test_dag_serialization.py index d95c45ed64628..c0650add59442 100644 --- a/tests/serialization/test_dag_serialization.py +++ b/tests/serialization/test_dag_serialization.py @@ -1712,7 +1712,12 @@ def test_custom_dep_detector(self): mode="reschedule", ) CustomDepOperator(task_id="hello", bash_command="hi") - dag = SerializedDAG.to_dict(dag) + with pytest.warns( + RemovedInAirflow3Warning, + match=r"Use of a custom dependency detector is deprecated\. " + r"Support will be removed in a future release\.", + ): + dag = SerializedDAG.to_dict(dag) assert sorted(dag["dag"]["dag_dependencies"], key=lambda x: tuple(x.values())) == sorted( [ {