Light Mode

Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit ea401c8

Browse files
authored andcommitted
[v3-1-test] Add number of queries guard in public providers list endpoints (#57635) (#57643)
(cherry picked from commit d72679e) Co-authored-by: Pierre Jeambrun
1 parent ae9ba12 commit ea401c8

File tree

1 file changed

+4
-1
lines changed
  • airflow-core/tests/unit/api_fastapi/core_api/routes/public
    • test_providers.py

1 file changed

+4
-1
lines changed

airflow-core/tests/unit/api_fastapi/core_api/routes/public/test_providers.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@
2222

2323
from airflow.providers_manager import ProviderInfo
2424

25+
from tests_common.test_utils.asserts import assert_queries_count
26+
2527
pytestmark = pytest.mark.db_test
2628

2729
MOCK_PROVIDERS = {
@@ -64,7 +66,8 @@ class TestGetProviders:
6466
def test_should_respond_200(
6567
self, mock_provider, test_client, query_params, expected_total_entries, expected_package_name
6668
):
67-
response = test_client.get("/providers", params=query_params)
69+
with assert_queries_count(0):
70+
response = test_client.get("/providers", params=query_params)
6871

6972
assert response.status_code == 200
7073
body = response.json()

0 commit comments

Comments
(0)