diff --git a/tests/api_experimental/auth/backend/test_basic_auth.py b/tests/api_experimental/auth/backend/test_basic_auth.py index 0d84465dd04462..a7f7a2a1cd8a87 100644 --- a/tests/api_experimental/auth/backend/test_basic_auth.py +++ b/tests/api_experimental/auth/backend/test_basic_auth.py @@ -21,6 +21,7 @@ import pytest from flask_login import current_user +from airflow.exceptions import RemovedInAirflow3Warning from tests.test_utils.db import clear_db_pools pytestmark = pytest.mark.db_test @@ -49,7 +50,10 @@ def test_success(self): clear_db_pools() with self.app.test_client() as test_client: - response = test_client.get("/api/experimental/pools", headers={"Authorization": token}) + with pytest.warns(RemovedInAirflow3Warning, match=r"Use Pool.get_pools\(\) instead"): + # Experimental client itself deprecated, no reason to change to actual methods + # It should be removed in the same time: Airflow 3.0 + response = test_client.get("/api/experimental/pools", headers={"Authorization": token}) assert current_user.email == "test@fab.org" assert response.status_code == 200