Coverage for src/tests/modules/teams/conftest.py: 100%
22 statements
« prev ^ index » next coverage.py v7.11.0, created at 2024-01-01 00:00 +0000
« prev ^ index » next coverage.py v7.11.0, created at 2024-01-01 00:00 +0000
1"""Module for common fixtures used for testing code of the club module."""
3import pytest
5from kwai_bc_teams.domain.team import TeamEntity
6from kwai_core.domain.presenter import Presenter
8from tests.fixtures.club.coaches import * # noqa
9from tests.fixtures.club.contacts import * # noqa
10from tests.fixtures.club.countries import * # noqa
11from tests.fixtures.club.members import * # noqa
12from tests.fixtures.club.persons import * # noqa
13from tests.fixtures.teams.team_members import * # noqa
14from tests.fixtures.teams.teams import * # noqa
17class DummyPresenter(Presenter[TeamEntity]):
18 """A dummy presenter for checking the use case result."""
20 def __init__(self):
21 super().__init__()
22 self._entity = None
24 @property
25 def entity(self):
26 """Return the entity."""
27 return self._entity
29 def present(self, use_case_result: TeamEntity) -> None:
30 """Process the result of the use case."""
31 self._entity = use_case_result
34@pytest.fixture
35def team_presenter() -> DummyPresenter:
36 """A fixture for a team presenter."""
37 return DummyPresenter()