aboutsummaryrefslogtreecommitdiff
path: root/tests.py
diff options
context:
space:
mode:
authorAlban Gruin2017-10-14 11:25:46 +0200
committerAlban Gruin2017-10-14 11:25:46 +0200
commit640496deb262349101567de12d2476cbfe5065b3 (patch)
treef3a0f6a102abbb0e41995e1d750c8fcc774efb55 /tests.py
parente2fb71d3377dee14cf1934ac3d6ad448bb7063bc (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.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/tests.py b/tests.py
index 1d23620..be7b884 100644
--- a/tests.py
+++ b/tests.py
@@ -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()