aboutsummaryrefslogtreecommitdiffstats
path: root/ctrack/organisations/tests/test_models.py
diff options
context:
space:
mode:
authorMatthew Lemon <matt@matthewlemon.com>2020-08-26 15:23:37 +0100
committerMatthew Lemon <matt@matthewlemon.com>2020-08-26 15:23:37 +0100
commit36759e44bc59747256332809097342a32ab6db19 (patch)
tree93647aad2ebdb78338fea899595a9ccf2e875246 /ctrack/organisations/tests/test_models.py
parentbc556144060dcbbf1d89279b9c5f3d54fa271b6b (diff)
further asserts added to the test
Diffstat (limited to '')
-rw-r--r--ctrack/organisations/tests/test_models.py8
1 files changed, 7 insertions, 1 deletions
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()]