This is an automated email from the ASF dual-hosted git repository.

ephraimanierobi pushed a commit to branch v3-1-test
in repository https://gitbox.apache.org/repos/asf/airflow.git


The following commit(s) were added to refs/heads/v3-1-test by this push:
     new b4b7fa3a171 [v3-1-test] Add number of queries guard for ui calendar 
(#58044) (#58050)
b4b7fa3a171 is described below

commit b4b7fa3a171db822a99b6bed6e72272ae68f61f1
Author: github-actions[bot] 
<41898282+github-actions[bot]@users.noreply.github.com>
AuthorDate: Mon Nov 10 13:29:45 2025 +0100

    [v3-1-test] Add number of queries guard for ui calendar (#58044) (#58050)
    
    (cherry picked from commit e4f9fef36e828d9a66f5e783f404d9acc2bc8a65)
    
    Co-authored-by: Pierre Jeambrun <[email protected]>
---
 .../tests/unit/api_fastapi/core_api/routes/ui/test_calendar.py     | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git 
a/airflow-core/tests/unit/api_fastapi/core_api/routes/ui/test_calendar.py 
b/airflow-core/tests/unit/api_fastapi/core_api/routes/ui/test_calendar.py
index fce45ffe1ef..250939852ee 100644
--- a/airflow-core/tests/unit/api_fastapi/core_api/routes/ui/test_calendar.py
+++ b/airflow-core/tests/unit/api_fastapi/core_api/routes/ui/test_calendar.py
@@ -25,6 +25,7 @@ from airflow.providers.standard.operators.empty import 
EmptyOperator
 from airflow.utils.session import provide_session
 from airflow.utils.state import DagRunState
 
+from tests_common.test_utils.asserts import assert_queries_count
 from tests_common.test_utils.db import clear_db_dags, clear_db_runs
 
 pytestmark = pytest.mark.db_test
@@ -103,7 +104,8 @@ class TestCalendar:
         ],
     )
     def test_daily_calendar(self, test_client, query_params, result):
-        response = test_client.get(f"/calendar/{self.DAG_NAME}", 
params=query_params)
+        with assert_queries_count(4):
+            response = test_client.get(f"/calendar/{self.DAG_NAME}", 
params=query_params)
         assert response.status_code == 200
         body = response.json()
         print(body)
@@ -173,7 +175,8 @@ class TestCalendar:
         ],
     )
     def test_hourly_calendar(self, setup_dag_runs, test_client, query_params, 
result):
-        response = test_client.get(f"/calendar/{self.DAG_NAME}", 
params=query_params)
+        with assert_queries_count(4):
+            response = test_client.get(f"/calendar/{self.DAG_NAME}", 
params=query_params)
         assert response.status_code == 200
         body = response.json()
 

Reply via email to