Revert "feat!: remove all access to Old Mongo courses"

This commit is contained in:
Michael Terry
2022-04-04 10:19:23 -04:00
committed by GitHub
parent 436fc52c52
commit 1cbd3e46ce
5 changed files with 0 additions and 59 deletions

View File

@@ -527,25 +527,6 @@ class TestCourseHomePageAccess(CourseHomePageTestCase):
)
self.assertRedirects(response, expected_url)
def test_old_mongo_access_error(self):
"""
Ensure that a user accessing an Old Mongo course sees a redirect to
the student dashboard, not a 404.
"""
course = CourseFactory.create(default_store=ModuleStoreEnum.Type.mongo)
user = UserFactory(password=self.TEST_PASSWORD)
self.client.login(username=user.username, password=self.TEST_PASSWORD)
response = self.client.get(course_home_url(course))
expected_params = QueryDict(mutable=True)
expected_params['access_response_error'] = f'{course.display_name_with_default} is no longer available.'
expected_url = '{url}?{params}'.format(
url=reverse('dashboard'),
params=expected_params.urlencode(),
)
self.assertRedirects(response, expected_url)
@mock.patch.dict(settings.FEATURES, {'DISABLE_START_DATES': False})
def test_expiration_banner_with_expired_upgrade_deadline(self):
"""