From 30dc5ad8b5ae12ef9e7ea1fbb69e2b356dcc97da Mon Sep 17 00:00:00 2001 From: Alban Gruin Date: Sat, 11 Feb 2017 12:01:45 +0100 Subject: Nouveau test pour les groupes --- tests.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/tests.py b/tests.py index 4825f91..3c58558 100644 --- a/tests.py +++ b/tests.py @@ -64,6 +64,23 @@ class GroupTestCase(TestCase): self.assertFalse(tpa21.corresponds_to(*cmb.group_info)) # TPA21 does not corresponds to CMB self.assertFalse(tpa21.corresponds_to(*tdb2.group_info)) # TPA21 does not corresponds to TDB2 + def test_get(self): + cma = Group.objects.get(name="L1 info s2 - CMA", timetable=self.timetable) + tda2 = Group.objects.get(name="L1 info s2 - TDA2", timetable=self.timetable) + tpa21 = Group.objects.get(name="L1 info s2 - TPA21", timetable=self.timetable) + + cmb = Group.objects.get(name="L1 info s2 - CMB", timetable=self.timetable) + tdb2 = Group.objects.get(name="L1 info s2 - TDB2", timetable=self.timetable) + tpb21 = Group.objects.get(name="L1 info s2 - TPB21", timetable=self.timetable) + + self.assertEqual(cma.celcat_name, "L1 info s2 - CMA") + self.assertEqual(tda2.celcat_name, "L1 info s2 - TDA2") + self.assertEqual(tpa21.celcat_name, "L1 info s2 - TPA21") + + self.assertEqual(cmb.celcat_name, "L1 info s2 - CMB") + self.assertEqual(tdb2.celcat_name, "L1 info s2 - TDB2") + self.assertEqual(tpb21.celcat_name, "L1 info s2 - TPB21") + def test_parse(self): cma = Group.objects.get(celcat_name="L1 info s2 - CMA", timetable=self.timetable) tda2 = Group.objects.get(celcat_name="L1 info s2 - TDA2", timetable=self.timetable) -- cgit v1.2.1