diff options
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 |