vatsrahul1001 commented on code in PR #54263:
URL: https://github.com/apache/airflow/pull/54263#discussion_r2273646378
##########
airflow-core/tests/unit/api_fastapi/core_api/routes/public/test_dags.py:
##########
@@ -367,7 +395,16 @@ def test_get_dags(self, test_client, query_params,
expected_total_entries, expec
body = response.json()
assert body["total_entries"] == expected_total_entries
- assert [dag["dag_id"] for dag in body["dags"]] == expected_ids
+ actual_ids = [dag["dag_id"] for dag in body["dags"]]
+
+ # For asset filter tests (but not sort tests), order doesn't matter,
so use set comparison
+ if (
+ any(param in query_params for param in ["has_asset_schedule",
"asset_dependency"])
+ and "order_by" not in query_params
+ ):
+ assert set(actual_ids) == set(expected_ids)
+ else:
+ assert actual_ids == expected_ids
Review Comment:
updated test
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]