We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 615de0f commit 6fdd09bCopy full SHA for 6fdd09b
tests/test_managers.py
@@ -1,5 +1,7 @@
1
+import calendar
2
from datetime import date, timedelta
3
4
+from dateutil.relativedelta import relativedelta
5
from django.contrib.auth import get_user_model
6
from django.test import TestCase, override_settings
7
from django.utils.timezone import now
@@ -119,7 +121,9 @@ def test_month_is_not_december(self):
119
121
120
122
def test_week(self):
123
# setUp
- january_time = now().replace(month=1, day=6)
124
+ january_time = now().replace(month=1, day=1)
125
+ # Move to the first week starting on the first Sunday of the year.
126
+ january_time += relativedelta(weekday=calendar.SUNDAY)
127
self.request.time = january_time
128
self.request.save()
129
# Test
0 commit comments