diff options
author | Matthew Lemon <lemon@matthewlemon.com> | 2020-05-30 17:23:43 +0100 |
---|---|---|
committer | Matthew Lemon <lemon@matthewlemon.com> | 2020-05-30 17:23:43 +0100 |
commit | f73d2e494420df99a34e1fda246d01a7ace5cb3e (patch) | |
tree | a80ebfe66e34599ff3f7a667e65ec2bf89f23313 /ctrack/organisations | |
parent | c88e010a4fe88b89629df274a2e431254b7ea9c9 (diff) |
cleaned up old User tests
Diffstat (limited to 'ctrack/organisations')
-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(): |