Initial commit from ZIP
This commit is contained in:
commit
378d4692a9
454 files changed
+40367
No files matched your search
Executable
+33
@@ -0,0 +1,33 @@
|
||||
import factory
|
||||
|
||||
from outbo.apps.products import models
|
||||
from tests.factories.projects import ProjectFactory
|
||||
from faker import Factory as FakerFactory
|
||||
|
||||
faker = FakerFactory.create()
|
||||
|
||||
|
||||
class ProductStageFactory(factory.django.DjangoModelFactory):
|
||||
id = ""
|
||||
label = ""
|
||||
group = 0
|
||||
description = ""
|
||||
next_action = ""
|
||||
order = 0
|
||||
|
||||
class Meta:
|
||||
model = models.ProductStage
|
||||
|
||||
|
||||
class PackagingTypeFactory(factory.django.DjangoModelFactory):
|
||||
name = factory.LazyAttribute(lambda x: faker.word())
|
||||
|
||||
class Meta:
|
||||
model = models.PackagingType
|
||||
|
||||
|
||||
class ProductFactory(factory.django.DjangoModelFactory):
|
||||
project = factory.SubFactory(ProjectFactory)
|
||||
|
||||
class Meta:
|
||||
model = models.Product
|
||||
Reference in new issue
Block a user