Coverage for src/tests/api/v1/conftest.py: 100%
23 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 defining reusable fixtures."""
3from typing import Any
5import pytest
7from kwai_bc_club.domain.country import CountryEntity, CountryIdentifier
9from tests.fixtures.club.coaches import * # noqa
10from tests.fixtures.club.contacts import * # noqa
11from tests.fixtures.club.countries import * # noqa
12from tests.fixtures.club.members import * # noqa
13from tests.fixtures.club.persons import * # noqa
14from tests.fixtures.identity.user_invitations import * # noqa
15from tests.fixtures.identity.users import * # noqa
16from tests.fixtures.portal.applications import * # noqa
17from tests.fixtures.portal.authors import * # noqa
18from tests.fixtures.portal.news import * # noqa
19from tests.fixtures.portal.pages import * # noqa
20from tests.fixtures.teams.teams import * # noqa
21from tests.fixtures.training.training_schemas import * # noqa
22from tests.fixtures.training.trainings import * # noqa
25@pytest.fixture
26def country() -> CountryEntity:
27 """A fixture for a country."""
28 return CountryEntity(id=CountryIdentifier(1), iso_2="JP", iso_3="JPN", name="Japan")
31@pytest.fixture
32def expected_country_json() -> dict[str, Any]:
33 """A fixture for a JSON:API resource of a country."""
34 return {
35 "data": {
36 "id": "1",
37 "type": "countries",
38 "attributes": {"iso_2": "JP", "iso_3": "JPN", "name": "Japan"},
39 }
40 }