Skip to content

Commit fb445ff

Browse files
committed
remove pytest db_test marker where unnecessary
1 parent 551f8be commit fb445ff

File tree

6 files changed

+0
-13
lines changed

6 files changed

+0
-13
lines changed

providers/fab/tests/unit/fab/auth_manager/api/auth/backend/test_basic_auth.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,6 @@ def function_decorated():
5959
mock_call()
6060

6161

62-
@pytest.mark.db_test
6362
class TestBasicAuth:
6463
def setup_method(self) -> None:
6564
mock_call.reset_mock()

providers/fab/tests/unit/fab/auth_manager/api/auth/backend/test_session.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@ def function_decorated():
3838
mock_call()
3939

4040

41-
@pytest.mark.db_test
4241
class TestSessionAuth:
4342
def setup_method(self) -> None:
4443
mock_call.reset_mock()

providers/fab/tests/unit/fab/auth_manager/api_fastapi/routes/test_login.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,9 @@
1919

2020
from unittest.mock import patch
2121

22-
import pytest
23-
2422
from airflow.providers.fab.auth_manager.api_fastapi.datamodels.login import LoginBody, LoginResponse
2523

2624

27-
@pytest.mark.db_test
2825
class TestLogin:
2926
dummy_login_body = LoginBody(username="dummy", password="dummy")
3027
dummy_token = LoginResponse(access_token="DUMMY_TOKEN")

providers/fab/tests/unit/fab/auth_manager/api_fastapi/services/test_login.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@
2929
from airflow.providers.fab.auth_manager.api_fastapi.datamodels.login import LoginResponse
3030

3131

32-
@pytest.mark.db_test
3332
@patch("airflow.providers.fab.auth_manager.api_fastapi.services.login.get_auth_manager")
3433
class TestLogin:
3534
def setup_method(

providers/fab/tests/unit/fab/auth_manager/cli_commands/test_utils.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,6 @@
3232
with ignore_provider_compatibility_error("2.9.0+", __file__):
3333
from airflow.providers.fab.auth_manager.cli_commands.utils import get_application_builder
3434

35-
pytestmark = pytest.mark.db_test
36-
3735

3836
@pytest.fixture
3937
def flask_app():

providers/fab/tests/unit/fab/auth_manager/test_fab_auth_manager.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,6 @@ def test_serialize_user(self, flask_app, auth_manager_with_appbuilder):
154154
result = auth_manager_with_appbuilder.serialize_user(user)
155155
assert result == {"sub": str(user.id)}
156156

157-
@pytest.mark.db_test
158157
@mock.patch.object(FabAuthManager, "get_user")
159158
def test_is_logged_in(self, mock_get_user, auth_manager_with_appbuilder):
160159
user = Mock()
@@ -163,7 +162,6 @@ def test_is_logged_in(self, mock_get_user, auth_manager_with_appbuilder):
163162

164163
assert auth_manager_with_appbuilder.is_logged_in() is False
165164

166-
@pytest.mark.db_test
167165
@mock.patch.object(FabAuthManager, "get_user")
168166
def test_is_logged_in_with_inactive_user(self, mock_get_user, auth_manager_with_appbuilder):
169167
user = Mock()
@@ -690,19 +688,16 @@ def test_get_authorized_dag_ids(
690688

691689
delete_user(flask_app, "username")
692690

693-
@pytest.mark.db_test
694691
def test_security_manager_return_fab_security_manager_override(self, auth_manager_with_appbuilder):
695692
assert isinstance(auth_manager_with_appbuilder.security_manager, FabAirflowSecurityManagerOverride)
696693

697-
@pytest.mark.db_test
698694
def test_security_manager_return_custom_provided(self, flask_app, auth_manager_with_appbuilder):
699695
class TestSecurityManager(FabAirflowSecurityManagerOverride):
700696
pass
701697

702698
flask_app.config["SECURITY_MANAGER_CLASS"] = TestSecurityManager
703699
assert isinstance(auth_manager_with_appbuilder.security_manager, TestSecurityManager)
704700

705-
@pytest.mark.db_test
706701
def test_security_manager_wrong_inheritance_raise_exception(
707702
self, flask_app, auth_manager_with_appbuilder
708703
):

0 commit comments

Comments
 (0)