From a8f4e552a83770fa39d4e22827e60c5a2afc2d5e Mon Sep 17 00:00:00 2001 From: fbraem Date: Fri, 28 Jul 2023 20:04:27 +0200 Subject: [PATCH] fix: add pytest mark --- backend/src/tests/modules/identity/test_authenticate_user.py | 2 ++ .../src/tests/modules/identity/test_delete_user_invitation.py | 2 ++ backend/src/tests/modules/identity/test_get_user_invitation.py | 2 ++ backend/src/tests/modules/identity/test_mail_user_invitation.py | 2 ++ backend/src/tests/modules/news/stories/test_stories_db_query.py | 2 ++ .../tests/modules/news/stories/test_stories_db_repository.py | 2 ++ backend/src/tests/modules/news/test_get_stories.py | 2 ++ 7 files changed, 14 insertions(+) diff --git a/backend/src/tests/modules/identity/test_authenticate_user.py b/backend/src/tests/modules/identity/test_authenticate_user.py index 89ae6630..fb5113d4 100644 --- a/backend/src/tests/modules/identity/test_authenticate_user.py +++ b/backend/src/tests/modules/identity/test_authenticate_user.py @@ -17,6 +17,8 @@ UserAccountDbRepository, ) +pytestmark = pytest.mark.db + @pytest.mark.asyncio async def test_authenticate_user(database: Database, user_account: UserAccountEntity): diff --git a/backend/src/tests/modules/identity/test_delete_user_invitation.py b/backend/src/tests/modules/identity/test_delete_user_invitation.py index 709873b1..d80e248c 100644 --- a/backend/src/tests/modules/identity/test_delete_user_invitation.py +++ b/backend/src/tests/modules/identity/test_delete_user_invitation.py @@ -19,6 +19,8 @@ UserInvitationRepository, ) +pytestmark = pytest.mark.db + @pytest.fixture(scope="module") def repo(database: Database) -> UserInvitationRepository: diff --git a/backend/src/tests/modules/identity/test_get_user_invitation.py b/backend/src/tests/modules/identity/test_get_user_invitation.py index e23f9f19..c4798c80 100644 --- a/backend/src/tests/modules/identity/test_get_user_invitation.py +++ b/backend/src/tests/modules/identity/test_get_user_invitation.py @@ -14,6 +14,8 @@ UserInvitationRepository, ) +pytestmark = pytest.mark.db + @pytest.fixture(scope="module") def repo(database: Database) -> UserInvitationRepository: diff --git a/backend/src/tests/modules/identity/test_mail_user_invitation.py b/backend/src/tests/modules/identity/test_mail_user_invitation.py index 8060a024..5822c09e 100644 --- a/backend/src/tests/modules/identity/test_mail_user_invitation.py +++ b/backend/src/tests/modules/identity/test_mail_user_invitation.py @@ -17,6 +17,8 @@ UserInvitationRepository, ) +pytestmark = [pytest.mark.db, pytest.mark.mail] + @pytest.fixture(scope="module") def repo(database: Database) -> UserInvitationRepository: diff --git a/backend/src/tests/modules/news/stories/test_stories_db_query.py b/backend/src/tests/modules/news/stories/test_stories_db_query.py index 31b7d031..b94bfdac 100644 --- a/backend/src/tests/modules/news/stories/test_stories_db_query.py +++ b/backend/src/tests/modules/news/stories/test_stories_db_query.py @@ -4,6 +4,8 @@ from kwai.core.db.database import Database from kwai.modules.news.stories.story_db_query import StoryDbQuery +pytestmark = pytest.mark.db + @pytest.mark.asyncio async def test_story_db_query(database: Database): diff --git a/backend/src/tests/modules/news/stories/test_stories_db_repository.py b/backend/src/tests/modules/news/stories/test_stories_db_repository.py index 9bbe30c6..5e915288 100644 --- a/backend/src/tests/modules/news/stories/test_stories_db_repository.py +++ b/backend/src/tests/modules/news/stories/test_stories_db_repository.py @@ -15,6 +15,8 @@ StoryRepository, ) +pytestmark = pytest.mark.db + @pytest.fixture(scope="module") async def repo(database: Database) -> StoryRepository: diff --git a/backend/src/tests/modules/news/test_get_stories.py b/backend/src/tests/modules/news/test_get_stories.py index 18cccab0..fb7ebd7e 100644 --- a/backend/src/tests/modules/news/test_get_stories.py +++ b/backend/src/tests/modules/news/test_get_stories.py @@ -8,6 +8,8 @@ from kwai.modules.news.stories.story_db_repository import StoryDbRepository from kwai.modules.news.stories.story_repository import StoryRepository +pytestmark = pytest.mark.db + @pytest.fixture(scope="module") def repo(database: Database) -> StoryRepository: