aboutsummaryrefslogtreecommitdiffstats
path: root/alphabetlearning/resources/factories.py
diff options
context:
space:
mode:
Diffstat (limited to 'alphabetlearning/resources/factories.py')
-rw-r--r--alphabetlearning/resources/factories.py10
1 files changed, 4 insertions, 6 deletions
diff --git a/alphabetlearning/resources/factories.py b/alphabetlearning/resources/factories.py
index 4075ab1..e406a9d 100644
--- a/alphabetlearning/resources/factories.py
+++ b/alphabetlearning/resources/factories.py
@@ -2,11 +2,8 @@ import itertools
import factory
-from .models import PDFPageSnapshot
-from .models import PDFResource
-from .models import Resource
-from .models import ResourceCategory
-from .models import ResourceType
+from .models import (PDFPageSnapshot, PDFResource, Resource, ResourceCategory,
+ ResourceType)
class ResourceTypeModelFactory(factory.django.DjangoModelFactory):
@@ -39,10 +36,11 @@ class ResourceModelFactory(factory.django.DjangoModelFactory):
model = Resource
name = factory.Sequence(lambda n: f"Default Resource {n}")
- price = factory.Faker("pydecimal", left_digits=4, right_digits=2, positive=True)
+ # price = factory.Faker("pydecimal", left_digits=4, right_digits=2, positive=True)
thumbnail_filenames = factory.List(
[factory.Faker("file_name", extension="jpg") for _ in range(3)]
)
+ # price_obj = factory.RelatedFactoryList("alphabetlearning.payments.factories.PriceFactory", size=1)
resource_type = factory.SubFactory(ResourceTypeModelFactory)
main_resource_category = factory.SubFactory(ResourceCategoryModelFactory)
subcategories = factory.RelatedFactoryList(ResourceCategoryModelFactory, size=2)