Beispiel #1
0
class DispensingSizeFactory(factory.DjangoModelFactory):
    class Meta:
        model = DispensingSize

    name = factory.Sequence(lambda x: "Unit %d" % x)
Beispiel #2
0
class GovDepartmentFactory(factory.django.DjangoModelFactory):
    name = factory.Sequence(lambda n: f"GovDepartment{n}")
    email_domains = factory.Sequence(lambda n: [f"department{n}.gov.uk"])

    class Meta:
        model = "accounts.GovDepartment"
Beispiel #3
0
class ConditionalOfferFactory(BaseConditionalOfferFactory):  # pylint: disable=function-redefined
    name = factory.Sequence(
        lambda n: 'ConditionalOffer {number}'.format(number=n))
class AgencyFactory(NodeFactory):
    name = factory.Sequence(lambda n: 'agency-%s' % n)
    typeOf = factory.SubFactory(AgencyTypeFactory)
Beispiel #5
0
class TutorFactory(factory.DjangoModelFactory):
    class Meta:
        model = 'base.Tutor'

    external_id = factory.Sequence(lambda n: '10000000%02d' % n)
    person = factory.SubFactory(PersonFactory)
Beispiel #6
0
class UserFactory(factory.django.DjangoModelFactory):
    class Meta:
        model = User

    username = factory.Sequence(lambda n: "user{}".format(n))
    email = factory.Sequence(lambda n: "user{}@example.com".format(n))
class PatientFactory(factory.django.DjangoModelFactory):
    class Meta:
        model = Patient

    name = factory.Sequence(lambda n: f"Patient {n}")
Beispiel #8
0
class CityFactory(factory.DjangoModelFactory):
    class Meta:
        model = City

    name = factory.Sequence(lambda x: "City %d" % x)
    country = factory.SubFactory(CountryFactory)
Beispiel #9
0
class ProductTypeFactory(DjangoModelFactory):
    class Meta:
        model = ProductType

    identifier = factory.Sequence(lambda n: 'type_%d' % n)
    name = fuzzy.FuzzyText(length=6, prefix="Product Type ")
Beispiel #10
0
class PaymentTermsFactory(factory.DjangoModelFactory):
    class Meta:
        model = PaymentTerms

    name = factory.Sequence(lambda x: f"Payment Term %d" % x)
Beispiel #11
0
class CountryFactory(factory.DjangoModelFactory):
    class Meta:
        model = Country

    name = factory.Sequence(lambda x: "Country %d" % x)
Beispiel #12
0
class TierFactory(factory.DjangoModelFactory):
    class Meta:
        model = Tier

    name = factory.Sequence(lambda x: f"Tier %d" % x)
Beispiel #13
0
class PromotionTypeFactory(factory.DjangoModelFactory):
    class Meta:
        model = PromotionType

    name = factory.Sequence(lambda x: "Promotion Type %d" % x)
Beispiel #14
0
class ProductCategoryFactory(factory.DjangoModelFactory):
    class Meta:
        model = ProductCategory

    name = factory.Sequence(lambda x: "Category %d" % x)
Beispiel #15
0
class AbstractBaseFactory(factory.django.DjangoModelFactory):
    class Meta:
        model = models.AbstractBase
        abstract = True

    foo = factory.Sequence(lambda n: "foo%d" % n)
Beispiel #16
0
class TagFactory(factory.Factory):
    FACTORY_FOR = Tag

    name = factory.Sequence(lambda n: 'tag_{}'.format(n))
Beispiel #17
0
class BodegaFactory(factory.django.DjangoModelFactory):
    class Meta:
        model = Bodega

    nombre = factory.Sequence(lambda n: 'nombre bodega %d' % n)
    es_principal = False
Beispiel #18
0
class GroupFactory(factory.django.DjangoModelFactory):
    name = factory.Sequence(lambda n: '{}-{}'.format(str(n), faker.job()))

    class Meta:
        model = Group
Beispiel #19
0
class PhotoFactory(factory.django.DjangoModelFactory):
    class Meta:
        model = Photo

    title = factory.Sequence(lambda n: "photo title {}".format(n))
    description = factory.Sequence(lambda n: "some_photo_description")
Beispiel #20
0
class InstanceActionFactory(DjangoModelFactory):
    class Meta:
        model = InstanceAction

    name = factory.Sequence(lambda n: "action-%s" % n)
    description = factory.Sequence(lambda n: "Description for action %s" % n)
class DepartmentFactory(NodeFactory):
    name = factory.Sequence(lambda n: 'department-%s' % n)
    typeOf = factory.SubFactory(DepartmentTypeFactory)
Beispiel #22
0
class WithCustomManagerFactory(factory.django.DjangoModelFactory):
    class Meta:
        model = models.WithCustomManager

    foo = factory.Sequence(lambda n: "foo%d" % n)
class ServiceFactory(NodeFactory):
    parent = factory.SubFactory(AgencyWithDepartmentFactory)
    name = factory.Sequence(lambda n: 'service-%s' % n)
    typeOf = factory.SubFactory(ServiceTypeFactory)
Beispiel #24
0
        class ExampleFactory(factory.django.DjangoModelFactory):
            class Meta:
                model = 'djapp.StandardModel'

            foo = factory.Sequence(lambda n: n)
Beispiel #25
0
class StyleFactory(factory.django.DjangoModelFactory):

    name = factory.Sequence(lambda n: 'style %d' % n)

    class Meta:
        model = Style
Beispiel #26
0
class StandardFactory(factory.django.DjangoModelFactory):
    class Meta:
        model = models.StandardModel

    foo = factory.Sequence(lambda n: "foo%d" % n)
Beispiel #27
0
class VoucherFactory(BaseVoucherFactory):  # pylint: disable=function-redefined
    name = factory.Faker('word')
    code = factory.Sequence(lambda n: 'VOUCHERCODE{number}'.format(number=n))
Beispiel #28
0
class NonIntegerPkFactory(factory.django.DjangoModelFactory):
    class Meta:
        model = models.NonIntegerPk

    foo = factory.Sequence(lambda n: "foo%d" % n)
    bar = ''
Beispiel #29
0
class DonorCodeT1Factory(factory.DjangoModelFactory):
    FACTORY_FOR = 'catalog.DonorCode'

    code = factory.Sequence(lambda n: 'donor-code-%s' % n)
    donor_code_type = DonorCode.T1
Beispiel #30
0
class OutletKindFactory(factory.DjangoModelFactory):
    class Meta:
        model = OutletKind

    name = factory.Sequence(lambda x: "Outlet Kind %d" % x)