Created
August 21, 2017 17:33
-
-
Save mredvard/e767a1ef708ae3f61575a2c86e6e3c84 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import factory | |
| from faker import Faker | |
| from core.tests.utils import create_datetime_range | |
| from .. import models | |
| faker = Faker() | |
| class PricingBlockFactory(factory.django.DjangoModelFactory): | |
| name = factory.LazyAttribute(lambda a: faker.first_name()) | |
| date_range = factory.LazyAttribute(lambda a: create_datetime_range()) | |
| amount = 25.0 | |
| prepaid_amount = 23.0 | |
| set_to_repeat = False | |
| class Meta: | |
| model = models.PriceBlock |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment