From 36759e44bc59747256332809097342a32ab6db19 Mon Sep 17 00:00:00 2001 From: Matthew Lemon Date: Wed, 26 Aug 2020 15:23:37 +0100 Subject: further asserts added to the test --- ctrack/organisations/tests/test_models.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'ctrack/organisations/tests/test_models.py') diff --git a/ctrack/organisations/tests/test_models.py b/ctrack/organisations/tests/test_models.py index 09d4f12..103ead4 100644 --- a/ctrack/organisations/tests/test_models.py +++ b/ctrack/organisations/tests/test_models.py @@ -44,8 +44,14 @@ def test_essential_service(org): ass = ApplicableSystemFactory.create( name=random.choice(fnames), organisation=org, caf=caf, ) + ass2 = ApplicableSystemFactory.create( + name=random.choice(fnames), organisation=org, caf=caf, + ) es = EssentialService.objects.create( name="Test ES", description="Test ES Description", organisation=org ) - es.systems.add(ass) + es.systems.add(ass, ass2) assert es.systems.first().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