From a7493d46b5e6a7665a26ddae4f3684b81007ac28 Mon Sep 17 00:00:00 2001 From: David Taylor Date: Tue, 21 Jul 2015 00:17:56 +0100 Subject: [PATCH] Updated tests to reflect model changes --- RIGS/test_models.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/RIGS/test_models.py b/RIGS/test_models.py index 5f94f9e3..91923ca1 100644 --- a/RIGS/test_models.py +++ b/RIGS/test_models.py @@ -144,16 +144,16 @@ class EventTestCase(TestCase): events = models.Event.objects.all() # Check person's organisations - self.assertIn(o1, p1.organisations) - self.assertIn(o2, p1.organisations) - self.assertIn(o1, p2.organisations) - self.assertNotIn(o2, p2.organisations) + self.assertIn((o1,2), p1.organisations) + self.assertIn((o2,1), p1.organisations) + self.assertIn((o1,2), p2.organisations) + self.assertEqual(len(p2.organisations), 1) # Check organisation's persons - self.assertIn(p1, o1.persons) - self.assertIn(p2, o1.persons) - self.assertIn(p1, o2.persons) - self.assertNotIn(p2, o2.persons) + self.assertIn((p1,2), o1.persons) + self.assertIn((p2,2), o1.persons) + self.assertIn((p1,1), o2.persons) + self.assertEqual(len(o2.persons),1) def test_cancelled_property(self): event = models.Event.objects.all()[0]