diff --git a/cms/djangoapps/contentstore/rest_api/v1/views/tests/test_proctoring.py b/cms/djangoapps/contentstore/rest_api/v1/views/tests/test_proctoring.py index 6cf08fe101e9..765c1b90cb6f 100644 --- a/cms/djangoapps/contentstore/rest_api/v1/views/tests/test_proctoring.py +++ b/cms/djangoapps/contentstore/rest_api/v1/views/tests/test_proctoring.py @@ -15,6 +15,7 @@ from cms.djangoapps.contentstore.tests.utils import CourseTestCase from openedx.core import toggles as core_toggles from openedx.core.djangoapps.course_apps.toggles import EXAMS_IDA +from xmodule.course_metadata_utils import DEFAULT_START_DATE from xmodule.modulestore.django import ( modulestore, ) # lint-amnesty, pylint: disable=wrong-import-order @@ -61,7 +62,7 @@ def get_expected_response_data( "proctoring_escalation_email": course.proctoring_escalation_email, "create_zendesk_tickets": course.create_zendesk_tickets, }, - "course_start_date": "2030-01-01T00:00:00Z", + "course_start_date": DEFAULT_START_DATE.strftime('%Y-%m-%dT%H:%M:%SZ'), "available_proctoring_providers": ["null"], "requires_escalation_email_providers": [], } @@ -100,7 +101,7 @@ def test_providers_with_disabled_lti(self): "proctoring_escalation_email": self.course.proctoring_escalation_email, "create_zendesk_tickets": self.course.create_zendesk_tickets, }, - "course_start_date": "2030-01-01T00:00:00Z", + "course_start_date": DEFAULT_START_DATE.strftime('%Y-%m-%dT%H:%M:%SZ'), "available_proctoring_providers": ["null"], "requires_escalation_email_providers": [], } @@ -123,7 +124,7 @@ def test_providers_with_enabled_lti(self): "proctoring_escalation_email": self.course.proctoring_escalation_email, "create_zendesk_tickets": self.course.create_zendesk_tickets, }, - "course_start_date": "2030-01-01T00:00:00Z", + "course_start_date": DEFAULT_START_DATE.strftime('%Y-%m-%dT%H:%M:%SZ'), "available_proctoring_providers": ["lti_external", "null"], "requires_escalation_email_providers": ["lti_external"], } diff --git a/cms/djangoapps/contentstore/signals/tests/test_handlers.py b/cms/djangoapps/contentstore/signals/tests/test_handlers.py index e70a62508f42..451f92a593d4 100644 --- a/cms/djangoapps/contentstore/signals/tests/test_handlers.py +++ b/cms/djangoapps/contentstore/signals/tests/test_handlers.py @@ -12,6 +12,7 @@ from xmodule.modulestore.edit_info import EditInfoMixin from xmodule.modulestore.django import SignalHandler from xmodule.modulestore.tests.django_utils import ModuleStoreTestCase +from xmodule.course_metadata_utils import DEFAULT_START_DATE from xmodule.modulestore.tests.factories import SampleCourseFactory @@ -34,7 +35,7 @@ def setUp(self): course_key=CourseLocator(org='TestU', course='sig101', run='Summer2022', branch=None, version_guid=None), name='Signals 101', schedule_data=CourseScheduleData( - start=datetime.fromisoformat('2030-01-01T00:00+00:00'), + start=DEFAULT_START_DATE, pacing='instructor', end=None, enrollment_start=None, diff --git a/cms/djangoapps/contentstore/views/tests/test_block.py b/cms/djangoapps/contentstore/views/tests/test_block.py index 31f5244e2f55..c4b3fffd1785 100644 --- a/cms/djangoapps/contentstore/views/tests/test_block.py +++ b/cms/djangoapps/contentstore/views/tests/test_block.py @@ -606,11 +606,11 @@ def test_create_block_negative(self): self.assertEqual(resp.status_code, 200) def test_create_with_future_date(self): - self.assertEqual(self.course.start, datetime(2030, 1, 1, tzinfo=UTC)) + self.assertEqual(self.course.start, DEFAULT_START_DATE) resp = self.create_xblock(category="chapter") usage_key = self.response_usage_key(resp) obj = self.get_item_from_modulestore(usage_key) - self.assertEqual(obj.start, datetime(2030, 1, 1, tzinfo=UTC)) + self.assertEqual(obj.start, DEFAULT_START_DATE) def test_static_tabs_initialization(self): """ @@ -3408,7 +3408,7 @@ def validate_chapter_xblock_info(self, xblock_info, has_child_info=True): xblock_info["course_graders"], ["Homework", "Lab", "Midterm Exam", "Final Exam"], ) - self.assertEqual(xblock_info["start"], "2030-01-01T00:00:00Z") + self.assertEqual(xblock_info["start"], DEFAULT_START_DATE.strftime('%Y-%m-%dT%H:%M:%SZ')) self.assertEqual(xblock_info["graded"], False) self.assertEqual(xblock_info["due"], None) self.assertEqual(xblock_info["format"], None) diff --git a/xmodule/course_metadata_utils.py b/xmodule/course_metadata_utils.py index e0320e6043e7..7233598d15b5 100644 --- a/xmodule/course_metadata_utils.py +++ b/xmodule/course_metadata_utils.py @@ -15,7 +15,7 @@ from zoneinfo import ZoneInfo -DEFAULT_START_DATE = datetime(2030, 1, 1, tzinfo=ZoneInfo("UTC")) +DEFAULT_START_DATE = datetime(2040, 1, 1, tzinfo=ZoneInfo("UTC")) """ Default grading policy for a course run.