diff options
Diffstat (limited to 'ctrack/organisations/tests')
-rw-r--r-- | ctrack/organisations/tests/factories.py | 10 | ||||
-rw-r--r-- | ctrack/organisations/tests/test_factories.py | 14 |
2 files changed, 5 insertions, 19 deletions
diff --git a/ctrack/organisations/tests/factories.py b/ctrack/organisations/tests/factories.py index ba2655e..a0b700d 100644 --- a/ctrack/organisations/tests/factories.py +++ b/ctrack/organisations/tests/factories.py @@ -32,16 +32,6 @@ def _random_submode(): return sms[random.randint(0, len(sms) - 1)] -class UserFactory(DjangoModelFactory): - # Better to create this using example in ctrack.users.tests.factories. - # Handles password generation correctly. - class Meta: - model = User - - username = Faker("lexify", text="???????", letters="abcdsgTGQA") - password = Faker("lexify", text="????????", letters="AdOIqkcvBnMP") - - class OrganisationFactory(DjangoModelFactory): class Meta: model = Organisation diff --git a/ctrack/organisations/tests/test_factories.py b/ctrack/organisations/tests/test_factories.py index 9c0d575..227d7db 100644 --- a/ctrack/organisations/tests/test_factories.py +++ b/ctrack/organisations/tests/test_factories.py @@ -1,12 +1,8 @@ -from ctrack.organisations.tests.factories import OrganisationFactory -from ctrack.organisations.tests.factories import PersonFactory -from ctrack.organisations.tests.factories import RoleFactory -from ctrack.organisations.tests.factories import UserFactory - - -def test_user_factory(): - u = UserFactory.build() - assert u.username +from ctrack.organisations.tests.factories import ( + OrganisationFactory, + PersonFactory, + RoleFactory, +) def test_organisation_factory(): |