diff options
author | Matthew Lemon <matt@matthewlemon.com> | 2020-08-28 11:46:15 +0100 |
---|---|---|
committer | Matthew Lemon <matt@matthewlemon.com> | 2020-08-28 11:46:15 +0100 |
commit | c27cfbc3cb2eb15eed0e1012f5bb8a537d6d9d5e (patch) | |
tree | 2b45a4ca05730fa07d4f9b51415e611b77bff20f | |
parent | 3913f7ead10b6f98c3f9b4e5882336f75b6f1576 (diff) |
fixed a failing new test (essential service)
-rw-r--r-- | ctrack/organisations/tests/test_models.py | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/ctrack/organisations/tests/test_models.py b/ctrack/organisations/tests/test_models.py index 103ead4..108d0ce 100644 --- a/ctrack/organisations/tests/test_models.py +++ b/ctrack/organisations/tests/test_models.py @@ -37,21 +37,18 @@ def test_essential_service(org): ) caf = CAF.objects.create( quality_grading=q1, + organisation=org, confidence_grading=c1, triage_review_date=None, triage_review_inspector=None, ) - ass = ApplicableSystemFactory.create( - name=random.choice(fnames), organisation=org, caf=caf, - ) - ass2 = ApplicableSystemFactory.create( - name=random.choice(fnames), organisation=org, caf=caf, - ) + ass = ApplicableSystemFactory.create(name=random.choice(fnames), caf=caf,) + ass2 = ApplicableSystemFactory.create(name=random.choice(fnames), caf=caf,) es = EssentialService.objects.create( name="Test ES", description="Test ES Description", organisation=org ) es.systems.add(ass, ass2) - assert es.systems.first().organisation.name == org.name + assert es.organisation.name == org.name assert es.name == "Test ES" assert es.systems.count() == 2 assert ass.name in [s.name for s in org.systems()] |