Skip to content

Commit 143a204

Browse files
committed
Исправлена нестабильная дата в тестах курсов
1 parent 32457b3 commit 143a204

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

courses/tests/helpers.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,9 @@
2626
from users.models import CustomUser
2727

2828

29+
DEFAULT_MODULE_START_DATE = date(2026, 1, 1)
30+
31+
2932
@dataclass(frozen=True)
3033
class CourseTestContext:
3134
user: CustomUser
@@ -110,7 +113,7 @@ def create_module(
110113
return CourseModule.objects.create(
111114
course=course,
112115
title=title,
113-
start_date=start_date_value or date.today(),
116+
start_date=start_date_value or DEFAULT_MODULE_START_DATE,
114117
status=status,
115118
order=order,
116119
)

0 commit comments

Comments
 (0)