diff options
author | Matthew Lemon <lemon@matthewlemon.com> | 2020-01-21 17:02:29 +0000 |
---|---|---|
committer | Matthew Lemon <lemon@matthewlemon.com> | 2020-01-21 17:02:29 +0000 |
commit | 490fc024506c9ed9f9c0b5a4cfbcdecc95127dbe (patch) | |
tree | 8cdd80340feb140115ca8fd4e5faf101ffb5ffcf /ctrack/users | |
parent | 1aade17fe69e52973fd43c4090dbdfaf50009c89 (diff) |
testing we can update an organisation
Diffstat (limited to 'ctrack/users')
-rw-r--r-- | ctrack/users/tests/factories.py | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/ctrack/users/tests/factories.py b/ctrack/users/tests/factories.py index 0a4acd6..9907945 100644 --- a/ctrack/users/tests/factories.py +++ b/ctrack/users/tests/factories.py @@ -5,13 +5,6 @@ from ctrack.organisations.models import Organisation, Address, AddressType from factory import DjangoModelFactory, Faker, post_generation, SubFactory -class OrganisationFactory(DjangoModelFactory): - name = Faker("company", locale="en_GB") - - class Meta: - model = Organisation - - class AddressTypeFactory(DjangoModelFactory): descriptor = "Primary Address" @@ -35,6 +28,14 @@ class AddressFactory(DjangoModelFactory): model = Address +class OrganisationFactory(DjangoModelFactory): + name = Faker("company", locale="en_GB") + address = SubFactory(AddressFactory) + + class Meta: + model = Organisation + + class UserFactory(DjangoModelFactory): username = Faker("user_name") email = Faker("email") |