fixtures.py (removed)

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

New path

isshub/domain/contexts/code_repository/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

feat(namespace): Add Namespace entity in core domain context

Commit
Hash

3a2dd3cc6f6de1fa1b03db95eaa357628824f075

Date

2019-06-07 21:03:50 +0200

Type

Added

Stats

+36 -0

@@ -0,0 +1,36 @@
+"""Module defining fixtures for the Namespace core entity."""
+
+
+from typing import Type
+
+from pytest import fixture
+
+from isshub.domain.contexts.core.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()