diff options
author | Matthew Lemon <matt@matthewlemon.com> | 2020-02-19 22:09:28 +0000 |
---|---|---|
committer | Matthew Lemon <matt@matthewlemon.com> | 2020-02-19 22:09:28 +0000 |
commit | 9f3176b50f0df2ad2b5069963ca5424dab56b613 (patch) | |
tree | b2a34013b6cc40a73a4237afd6649c30c2c38d3b /ctrack | |
parent | ac2a715c0bc38e8a03640c604b8ed082456b2109 (diff) |
Fixed PersonFactory
Diffstat (limited to 'ctrack')
-rw-r--r-- | ctrack/organisations/tests/factories.py | 4 | ||||
-rw-r--r-- | ctrack/organisations/tests/test_factories.py | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/ctrack/organisations/tests/factories.py b/ctrack/organisations/tests/factories.py index 32692cc..aaca669 100644 --- a/ctrack/organisations/tests/factories.py +++ b/ctrack/organisations/tests/factories.py @@ -74,7 +74,7 @@ class RoleFactory(DjangoModelFactory): class Meta: model = Role - name = Faker("name") + name = Faker("job") class PersonFactory(DjangoModelFactory): @@ -110,5 +110,5 @@ class PersonFactory(DjangoModelFactory): clearance_expiry = factory.LazyFunction(datetime.now) active = True date_ended = Faker("date_this_year") -# predecessor = SubFactory("ctrack.organisations.tests.factories.PersonFactory") + predecessor = SubFactory("ctrack.organisations.tests.factories.PersonFactory") comments = "Yaa!" diff --git a/ctrack/organisations/tests/test_factories.py b/ctrack/organisations/tests/test_factories.py index 38082fc..649c0e4 100644 --- a/ctrack/organisations/tests/test_factories.py +++ b/ctrack/organisations/tests/test_factories.py @@ -37,5 +37,5 @@ def test_role_factory(): def test_person_factory(): r = RoleFactory.build() - p = PersonFactory.build(role=r) + p = PersonFactory.build(role=r, predecessor=None) assert p.first_name |