diff options
author | Alban Gruin | 2017-10-14 11:25:46 +0200 |
---|---|---|
committer | Alban Gruin | 2017-10-14 11:25:46 +0200 |
commit | 640496deb262349101567de12d2476cbfe5065b3 (patch) | |
tree | f3a0f6a102abbb0e41995e1d750c8fcc774efb55 /tests.py | |
parent | e2fb71d3377dee14cf1934ac3d6ad448bb7063bc (diff) |
timezone.now() retourne l’heure UTC, ce qui empêche la mise à jour de
la semaine prochaine le samedi à minuit. Remplacement de ces appels
par une fonction qui retourne la bonne heure dans le bon fuseau horaire.
Diffstat (limited to 'tests.py')
-rw-r--r-- | tests.py | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -17,11 +17,12 @@ 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() |