From c27cfbc3cb2eb15eed0e1012f5bb8a537d6d9d5e Mon Sep 17 00:00:00 2001 From: Matthew Lemon Date: Fri, 28 Aug 2020 11:46:15 +0100 Subject: fixed a failing new test (essential service) --- ctrack/organisations/tests/test_models.py | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) (limited to 'ctrack/organisations/tests') 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()] -- cgit v1.2.3