diff options
author | Alban Gruin | 2017-02-11 12:01:45 +0100 |
---|---|---|
committer | Alban Gruin | 2017-02-11 12:01:45 +0100 |
commit | 30dc5ad8b5ae12ef9e7ea1fbb69e2b356dcc97da (patch) | |
tree | 6b0fb54ae8a0c635230409a163c1273d19de9159 | |
parent | addaa7c09761107f589585fecf8af897f9f01b2c (diff) |
Nouveau test pour les groupes
-rw-r--r-- | tests.py | 17 |
1 files changed, 17 insertions, 0 deletions
@@ -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) |