From a7afbfd090c3f059eeb0fe1573ca56f4c4cb9867 Mon Sep 17 00:00:00 2001 From: Matthew Lemon Date: Wed, 11 Sep 2024 16:25:09 +0100 Subject: Some formatting changes and calming down ruff slightly --- pyblackbird_cc/resources/factories.py | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'pyblackbird_cc/resources/factories.py') diff --git a/pyblackbird_cc/resources/factories.py b/pyblackbird_cc/resources/factories.py index 6d6311a..fef8cfb 100644 --- a/pyblackbird_cc/resources/factories.py +++ b/pyblackbird_cc/resources/factories.py @@ -34,24 +34,25 @@ class PDFPageSnapshotModelFactory(factory.django.DjangoModelFactory): pdf_file = factory.SubFactory("pyblackbird_cc.resources.factories.PDFResourceModelFactory") - class ResourceModelFactory(factory.django.DjangoModelFactory): class Meta: model = Resource name = factory.Sequence(lambda n: f"Default Resource {n}") - 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 = 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)] + ) resource_type = factory.SubFactory(ResourceTypeModelFactory) main_resource_category = factory.SubFactory(ResourceCategoryModelFactory) subcategories = factory.RelatedFactoryList(ResourceCategoryModelFactory, size=2) - description = factory.Faker('paragraph') - card_description = factory.Faker('text', max_nb_chars=1000) + description = factory.Faker("paragraph") + card_description = factory.Faker("text", max_nb_chars=1000) age_range = factory.Iterator(["5-7", "7-9", "9-11"]) curriculum = factory.Iterator(["English", "Scottish", "No curriculum"]) feature_slot = factory.Iterator(itertools.chain([1, 2, 3], itertools.repeat(None))) - created_at = factory.Faker('date_time_this_year') - updated_at = factory.Faker('date_time_this_month') + created_at = factory.Faker("date_time_this_year") + updated_at = factory.Faker("date_time_this_month") @factory.post_generation def pdfs(self, create, extracted, **kwargs): -- cgit v1.2.3