diff --git a/airflow-core/tests/unit/api_fastapi/core_api/routes/public/test_connections.py b/airflow-core/tests/unit/api_fastapi/core_api/routes/public/test_connections.py index 1dc77cede75b7..4d45e7a6ef89d 100644 --- a/airflow-core/tests/unit/api_fastapi/core_api/routes/public/test_connections.py +++ b/airflow-core/tests/unit/api_fastapi/core_api/routes/public/test_connections.py @@ -27,6 +27,7 @@ from airflow.utils.session import provide_session from tests_common.test_utils.api_fastapi import _check_last_log +from tests_common.test_utils.asserts import assert_queries_count from tests_common.test_utils.db import clear_db_connections, clear_db_logs, clear_test_connections from tests_common.test_utils.markers import skip_if_force_lowest_dependencies_marker @@ -217,7 +218,10 @@ def test_should_respond_200( self, test_client, session, query_params, expected_total_entries, expected_ids ): self.create_connections() - response = test_client.get("/connections", params=query_params) + + with assert_queries_count(3): + response = test_client.get("/connections", params=query_params) + assert response.status_code == 200 body = response.json()