aboutsummaryrefslogtreecommitdiffstats
path: root/ctrack/users
diff options
context:
space:
mode:
authorMatthew Lemon <lemon@matthewlemon.com>2020-01-20 20:54:42 +0000
committerMatthew Lemon <lemon@matthewlemon.com>2020-01-20 20:54:42 +0000
commit793d16fbc7d531c575601a64be91f7ac8250aab0 (patch)
tree06af18fa90f13702daad49cecc4f902241c06d93 /ctrack/users
parentb3ba5d7a9758a0e167409757dbe46dfc75bade5c (diff)
partial way through playing with Faker
Diffstat (limited to 'ctrack/users')
-rw-r--r--ctrack/users/tests/factories.py16
1 files changed, 15 insertions, 1 deletions
diff --git a/ctrack/users/tests/factories.py b/ctrack/users/tests/factories.py
index d4b9544..b104a23 100644
--- a/ctrack/users/tests/factories.py
+++ b/ctrack/users/tests/factories.py
@@ -1,7 +1,7 @@
from typing import Any, Sequence
from django.contrib.auth import get_user_model
-from ctrack.organisations.models import Organisation
+from ctrack.organisations.models import Organisation, Address
from factory import DjangoModelFactory, Faker, post_generation
@@ -13,6 +13,20 @@ class OrganisationFactory(DjangoModelFactory):
model = Organisation
+class AddressFactory(DjangoModelFactory):
+ line1 = Faker("line1")
+ line2 = Faker("line2")
+ line3 = Faker("line3")
+ city = Faker("city")
+ county = Faker("county")
+ postcode = Faker("postcode")
+ country = Faker("country")
+ other_details = Faker("other_details")
+
+ class Meta:
+ model = Address
+
+
class UserFactory(DjangoModelFactory):
username = Faker("user_name")