fixtures.py

Last source

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
"""Module defining fixtures for the Namespace code_repository entity."""


from typing import Type

from pytest import fixture

from isshub.domain.contexts.code_repository.entities.namespace import Namespace

from .factories import NamespaceFactory


@fixture  # type: ignore
def namespace_factory() -> Type[NamespaceFactory]:
    """Fixture to return the factory to create a ``Namespace``.

    Returns
    -------
    Type[NamespaceFactory]
        The ``NamespaceFactory`` class.

    """
    return NamespaceFactory


@fixture  # type: ignore
def namespace() -> Namespace:
    """Fixture to return a ``Namespace``.

    Returns
    -------
    Namespace
        The created ``Namespace``

    """
    return NamespaceFactory()

Changes

refactor(core): Rename core domain context to code_repository

Commit
Hash

07e279b370c0924f2b2cf32aea016b307001dfa0

Date

2019-08-15 23:31:33 +0200

Type

Renamed

Old path

isshub/domain/contexts/core/entities/namespace/tests/fixtures.py

Stats

+2 -2

@@ -1,11 +1,11 @@
-"""Module defining fixtures for the Namespace core entity."""
+"""Module defining fixtures for the Namespace code_repository entity."""


 from typing import Type

 from pytest import fixture

-from isshub.domain.contexts.core.entities.namespace import Namespace
+from isshub.domain.contexts.code_repository.entities.namespace import Namespace

 from .factories import NamespaceFactory