Skip to content

Commit

Permalink
Specify fixture loop_scope
Browse files Browse the repository at this point in the history
  • Loading branch information
anthony-symphony committed Oct 30, 2024
1 parent 89d6653 commit 6c7e593
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tests/ext/group_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,31 +26,31 @@
SESSION_TOKEN = "session_token"


@pytest.fixture(name="auth_session")
@pytest.fixture(loop_scope="module", name="auth_session")
def fixture_auth_session():
auth_session = AuthSession(None)
auth_session.session_token = SESSION_TOKEN
auth_session.key_manager_token = "km_token"
return auth_session


@pytest.fixture(name="api_client_factory")
@pytest.fixture(loop_scope="module", name="api_client_factory")
def fixture_api_client_factory(api_client, login_client):
factory = AsyncMock(ApiClientFactory)
factory.get_client.return_value = api_client
factory.get_login_client.return_value = login_client
return factory


@pytest.fixture(name="api_client")
@pytest.fixture(loop_scope="module", name="api_client")
def fixture_api_client():
api_client = MagicMock(wraps=ApiClient())
api_client.call_api = AsyncMock()
api_client.configuration = Configuration()
return api_client


@pytest.fixture(name="login_client")
@pytest.fixture(loop_scope="module", name="login_client")
def fixture_login_client():
api_client = MagicMock(ApiClient)
api_client.call_api = AsyncMock()
Expand Down

0 comments on commit 6c7e593

Please sign in to comment.