diff options
author | Alban Gruin | 2017-11-07 18:04:31 +0100 |
---|---|---|
committer | Alban Gruin | 2017-11-07 18:04:31 +0100 |
commit | ffffd9842dbaba0b0e89ff5f434f45792e2b73b6 (patch) | |
tree | 8e771d2e87e3fcc28efd1bd3beb4583af8231f88 /tests.py | |
parent | ae3358c1296a02352409910a9ffcc2307d5ea87a (diff) | |
parent | 04ca9906dccbfd290a08aef037873302ff7eac3d (diff) |
Merge branch 'stable/0.11.z' into prod/pa1ch/0.y.zv0.11.0-pa1ch
Diffstat (limited to 'tests.py')
-rw-r--r-- | tests.py | 17 |
1 files changed, 8 insertions, 9 deletions
@@ -14,14 +14,13 @@ # along with celcatsanitizer. If not, see <http://www.gnu.org/licenses/>. from django.test import TestCase -from django.utils import timezone - from .models import Course, Group, Timetable, Year +from .utils import tz_now class CourseTestCase(TestCase): def setUp(self): - dt = timezone.now() + dt = tz_now() self.year = Year(name="L2", slug="l2") self.year.save() @@ -129,10 +128,10 @@ class GroupTestCase(TestCase): tdb2 = Group.objects.get(celcat_name="L1 info s2 TDB2", timetable=self.timetable) tpb21 = Group.objects.get(celcat_name="L1 info s2 TPB21", timetable=self.timetable) - self.assertEqual(cma.group_info, (self.timetable.id, "L1 info s2", "A", None, None)) - self.assertEqual(tda2.group_info, (self.timetable.id, "L1 info s2", "A", 2, None)) - self.assertEqual(tpa21.group_info, (self.timetable.id, "L1 info s2", "A", 2, 1)) + self.assertEqual(cma.group_info, (self.timetable.id, "L1 info", "A")) + self.assertEqual(tda2.group_info, (self.timetable.id, "L1 info", "A2")) + self.assertEqual(tpa21.group_info, (self.timetable.id, "L1 info", "A21")) - self.assertEqual(cmb.group_info, (self.timetable.id, "L1 info s2", "B", None, None)) - self.assertEqual(tdb2.group_info, (self.timetable.id, "L1 info s2", "B", 2, None)) - self.assertEqual(tpb21.group_info, (self.timetable.id, "L1 info s2", "B", 2, 1)) + self.assertEqual(cmb.group_info, (self.timetable.id, "L1 info", "B")) + self.assertEqual(tdb2.group_info, (self.timetable.id, "L1 info", "B2")) + self.assertEqual(tpb21.group_info, (self.timetable.id, "L1 info", "B21")) |