diff options
Diffstat (limited to '')
-rw-r--r-- | ctrack/organisations/tests/test_models.py | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/ctrack/organisations/tests/test_models.py b/ctrack/organisations/tests/test_models.py index 416a9fd..6c41c49 100644 --- a/ctrack/organisations/tests/test_models.py +++ b/ctrack/organisations/tests/test_models.py @@ -11,21 +11,26 @@ def test_organisation_get_absolute_url(org): assert org.get_absolute_url() == f"/organisations/{slug}/" -def test_delete_organisation(org): +def test_delete_organisation(org_with_people): orgs = Organisation.objects.all() - assert org in orgs - Organisation.delete(org) + assert org_with_people in orgs + Organisation.delete(org_with_people) # Assert that the record has been deleted assert Organisation.objects.count() == 0 -def test_update_organisation(org): +def test_update_organisation(org_with_people): # Change the name of the organisation - org.name = "Tonkers Ltd" - org.save() - assert org.name == "Tonkers Ltd" + org_with_people.name = "Tonkers Ltd" + org_with_people.save() + assert org_with_people.name == "Tonkers Ltd" def test_new_address(addr): # The address "has" an organisation assert addr.organisation.name + + +def test_incident_report(org_with_people): + breakpoint() + pass |