factories.py (removed)¶
Last source¶
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | """Module defining factories for the Repository code_repository entity."""
import factory
from isshub.domain.contexts.code_repository.entities.repository import Repository
from ...namespace.tests.factories import NamespaceFactory
class RepositoryFactory(factory.Factory):
"""Factory for the ``Repository`` code_repository entity."""
class Meta:
"""Factory config."""
model = Repository
id = factory.Faker("pyint", min_value=1)
name = factory.Faker("pystr", min_chars=2)
namespace = factory.SubFactory(NamespaceFactory)
|
Changes¶
refactor(core): Rename core domain context to code_repository¶
- Commit
- Hash
- Date
2019-08-15 23:31:33 +0200
- Type
Renamed
- New path
isshub/domain/contexts/code_repository/entities/repository/tests/factories.py
- Stats
+3 -3
@@ -1,14 +1,14 @@
-"""Module defining factories for the Repository core entity."""
+"""Module defining factories for the Repository code_repository entity."""
import factory
-from isshub.domain.contexts.core.entities.repository import Repository
+from isshub.domain.contexts.code_repository.entities.repository import Repository
from ...namespace.tests.factories import NamespaceFactory
class RepositoryFactory(factory.Factory):
- """Factory for the ``Repository`` core entity."""
+ """Factory for the ``Repository`` code_repository entity."""
class Meta:
"""Factory config."""
fix(faker): Handle change of min (to min_value) arg for pyint¶
- Commit
- Hash
- Date
2019-08-15 23:15:21 +0200
- Type
Modified
- Stats
+1 -1
@@ -15,6 +15,6 @@ class RepositoryFactory(factory.Factory):
model = Repository
- id = factory.Faker("pyint", min=1)
+ id = factory.Faker("pyint", min_value=1)
name = factory.Faker("pystr", min_chars=2)
namespace = factory.SubFactory(NamespaceFactory)
feat(namespace): Add Namespace entity in core domain context¶
- Commit
- Hash
- Date
2019-06-07 21:03:50 +0200
- Type
Modified
- Stats
+3 -1
@@ -4,6 +4,8 @@ import factory
from isshub.domain.contexts.core.entities.repository import Repository
+from ...namespace.tests.factories import NamespaceFactory
+
class RepositoryFactory(factory.Factory):
"""Factory for the ``Repository`` core entity."""
@@ -15,4 +17,4 @@ class RepositoryFactory(factory.Factory):
id = factory.Faker("pyint", min=1)
name = factory.Faker("pystr", min_chars=2)
- namespace = factory.Faker("pystr", min_chars=2)
+ namespace = factory.SubFactory(NamespaceFactory)
feat(repository): Add 1st domain context (core) and entity (Repository)¶
- Commit
- Hash
- Date
2019-06-07 21:03:50 +0200
- Type
Added
- Stats
+18 -0
@@ -0,0 +1,18 @@
+"""Module defining factories for the Repository core entity."""
+
+import factory
+
+from isshub.domain.contexts.core.entities.repository import Repository
+
+
+class RepositoryFactory(factory.Factory):
+ """Factory for the ``Repository`` core entity."""
+
+ class Meta:
+ """Factory config."""
+
+ model = Repository
+
+ id = factory.Faker("pyint", min=1)
+ name = factory.Faker("pystr", min_chars=2)
+ namespace = factory.Faker("pystr", min_chars=2)