Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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
from xmodule.modulestore.tests.django_utils import ( # lint-amnesty, pylint: disable=wrong-import-order
ModuleStoreTestCase,
Expand Down Expand Up @@ -59,7 +60,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": [],
}
Expand Down Expand Up @@ -98,7 +99,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": [],
}
Expand All @@ -121,7 +122,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"],
}
Expand Down
3 changes: 2 additions & 1 deletion cms/djangoapps/contentstore/signals/tests/test_handlers.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
from openedx_events.content_authoring.data import CourseCatalogData, CourseScheduleData

import cms.djangoapps.contentstore.signals.handlers as sh
from xmodule.course_metadata_utils import DEFAULT_START_DATE
from xmodule.modulestore.django import SignalHandler
from xmodule.modulestore.edit_info import EditInfoMixin
from xmodule.modulestore.tests.django_utils import ModuleStoreTestCase
Expand All @@ -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,
Expand Down
6 changes: 3 additions & 3 deletions cms/djangoapps/contentstore/views/tests/test_block.py
Original file line number Diff line number Diff line change
Expand Up @@ -593,11 +593,11 @@ def test_create_block_negative(self):
self.assertEqual(resp.status_code, 200) # noqa: PT009

def test_create_with_future_date(self):
self.assertEqual(self.course.start, datetime(2030, 1, 1, tzinfo=UTC)) # noqa: PT009
self.assertEqual(self.course.start, DEFAULT_START_DATE) # noqa: PT009
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)) # noqa: PT009
self.assertEqual(obj.start, DEFAULT_START_DATE) # noqa: PT009

def test_static_tabs_initialization(self):
"""
Expand Down Expand Up @@ -3395,7 +3395,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") # noqa: PT009
self.assertEqual(xblock_info["start"], DEFAULT_START_DATE.strftime('%Y-%m-%dT%H:%M:%SZ')) # noqa: PT009
self.assertEqual(xblock_info["graded"], False) # noqa: PT009
self.assertEqual(xblock_info["due"], None) # noqa: PT009
self.assertEqual(xblock_info["format"], None) # noqa: PT009
Expand Down
2 changes: 1 addition & 1 deletion xmodule/course_metadata_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

import dateutil.parser

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.
Expand Down
Loading