diff options
author | Matthew Lemon <matt@matthewlemon.com> | 2020-02-20 13:33:48 +0000 |
---|---|---|
committer | Matthew Lemon <matt@matthewlemon.com> | 2020-02-20 13:33:48 +0000 |
commit | 9c1e4edd81d676c92503061c24f7e8660cc94482 (patch) | |
tree | 485e3af65a192196ac73402e6b6b5279e758f8a0 /ctrack/users | |
parent | 7523b27d1e67fa32584f1d34777faf2e53ce6edf (diff) |
failing test - need to tweak db
Diffstat (limited to 'ctrack/users')
-rw-r--r-- | ctrack/users/tests/factories.py | 33 |
1 files changed, 1 insertions, 32 deletions
diff --git a/ctrack/users/tests/factories.py b/ctrack/users/tests/factories.py index 53584b7..b4ddad0 100644 --- a/ctrack/users/tests/factories.py +++ b/ctrack/users/tests/factories.py @@ -1,38 +1,7 @@ from typing import Any, Sequence from django.contrib.auth import get_user_model -from ctrack.organisations.models import Organisation, Address, AddressType -from factory import DjangoModelFactory, Faker, post_generation, SubFactory - - -class AddressTypeFactory(DjangoModelFactory): - descriptor = "Primary Address" - - class Meta: - model = AddressType - - -class OrganisationFactory(DjangoModelFactory): - name = Faker("company", locale="en_GB") - - class Meta: - model = Organisation - - -class AddressFactory(DjangoModelFactory): - type = SubFactory(AddressTypeFactory) - organisation = SubFactory(OrganisationFactory) - line1 = Faker("secondary_address", locale="en_GB") - line2 = Faker("street_name", locale="en_GB") - line3 = Faker("secondary_address", locale="en_GB") - city = Faker("city", locale="en_GB") - county = Faker("lexify", locale="en_GB", text="??????", letters="aeioutzyj") - postcode = Faker("postcode", locale="en_GB") - country = Faker("country") - other_details = Faker("lexify", locale="en_GB", text="??????", letters="aeioutzyj") - - class Meta: - model = Address +from factory import DjangoModelFactory, Faker, post_generation class UserFactory(DjangoModelFactory): |