diff --git a/lms/djangoapps/courseware/tests/test_about.py b/lms/djangoapps/courseware/tests/test_about.py index 3154b39002..c38eac5995 100644 --- a/lms/djangoapps/courseware/tests/test_about.py +++ b/lms/djangoapps/courseware/tests/test_about.py @@ -19,10 +19,6 @@ class AboutTestCase(LoginEnrollmentTestCase, ModuleStoreTestCase): category="about", parent_location=self.course.location, data="OOGIE BLOOGIE", display_name="overview" ) - # The following XML course is closed; we're testing that - # an about page still appears when the course is already closed - self.xml_course_id = 'edX/detached_pages/2014' - self.xml_data = "about page 463139" def test_logged_in(self): self.setup_user() @@ -37,6 +33,18 @@ class AboutTestCase(LoginEnrollmentTestCase, ModuleStoreTestCase): self.assertEqual(resp.status_code, 200) self.assertIn("OOGIE BLOOGIE", resp.content) + +@override_settings(MODULESTORE=TEST_DATA_MIXED_MODULESTORE) +class AboutTestCaseXML(LoginEnrollmentTestCase, ModuleStoreTestCase): + # The following XML test course (which lives at common/test/data/2014) + # is closed; we're testing that an about page still appears when + # the course is already closed + xml_course_id = 'edX/detached_pages/2014' + + # this text appears in that course's about page + # common/test/data/2014/about/overview.html + xml_data = "about page 463139" + @mock.patch.dict('django.conf.settings.FEATURES', {'DISABLE_START_DATES': False}) def test_logged_in_xml(self): self.setup_user() @@ -68,10 +76,6 @@ class AboutWithCappedEnrollmentsTestCase(LoginEnrollmentTestCase, ModuleStoreTes category="about", parent_location=self.course.location, data="OOGIE BLOOGIE", display_name="overview" ) - # The following XML course is closed; we're testing that - # an about page still appears when the course is already closed - self.xml_course_id = 'edX/detached_pages/2014' - self.xml_data = "about page 463139" def test_enrollment_cap(self): """ diff --git a/lms/djangoapps/courseware/tests/test_course_info.py b/lms/djangoapps/courseware/tests/test_course_info.py index 661bb28ca1..07b5d97ca7 100644 --- a/lms/djangoapps/courseware/tests/test_course_info.py +++ b/lms/djangoapps/courseware/tests/test_course_info.py @@ -19,10 +19,6 @@ class CourseInfoTestCase(LoginEnrollmentTestCase, ModuleStoreTestCase): category="course_info", parent_location=self.course.location, data="OOGIE BLOOGIE", display_name="updates" ) - # The following XML course is closed; we're testing that - # a course info page still appears when the course is already closed - self.xml_data = "course info 463139" - self.xml_course_id = "edX/detached_pages/2014" def test_logged_in(self): self.setup_user() @@ -37,6 +33,18 @@ class CourseInfoTestCase(LoginEnrollmentTestCase, ModuleStoreTestCase): self.assertEqual(resp.status_code, 200) self.assertNotIn("OOGIE BLOOGIE", resp.content) + +@override_settings(MODULESTORE=TEST_DATA_MIXED_MODULESTORE) +class CourseInfoTestCaseXML(LoginEnrollmentTestCase, ModuleStoreTestCase): + # The following XML test course (which lives at common/test/data/2014) + # is closed; we're testing that a course info page still appears when + # the course is already closed + xml_course_id = 'edX/detached_pages/2014' + + # this text appears in that course's course info page + # common/test/data/2014/info/updates.html + xml_data = "course info 463139" + @mock.patch.dict('django.conf.settings.FEATURES', {'DISABLE_START_DATES': False}) def test_logged_in_xml(self): self.setup_user() diff --git a/lms/djangoapps/courseware/tests/test_tabs.py b/lms/djangoapps/courseware/tests/test_tabs.py index 31da4fd581..230f54a772 100644 --- a/lms/djangoapps/courseware/tests/test_tabs.py +++ b/lms/djangoapps/courseware/tests/test_tabs.py @@ -155,11 +155,6 @@ class StaticTabDateTestCase(LoginEnrollmentTestCase, ModuleStoreTestCase): category="static_tab", parent_location=self.course.location, data="OOGIE BLOOGIE", display_name="new_tab" ) - # The following XML course is closed; we're testing that - # static tabs still appear when the course is already closed - self.xml_data = "static 463139" - self.xml_url = "8e4cce2b4aaf4ba28b1220804619e41f" - self.xml_course_id = 'edX/detached_pages/2014' def test_logged_in(self): self.setup_user() @@ -174,6 +169,19 @@ class StaticTabDateTestCase(LoginEnrollmentTestCase, ModuleStoreTestCase): self.assertEqual(resp.status_code, 200) self.assertIn("OOGIE BLOOGIE", resp.content) + +@override_settings(MODULESTORE=TEST_DATA_MIXED_MODULESTORE) +class StaticTabDateTestCaseXML(LoginEnrollmentTestCase, ModuleStoreTestCase): + # The following XML test course (which lives at common/test/data/2014) + # is closed; we're testing that tabs still appear when + # the course is already closed + xml_course_id = 'edX/detached_pages/2014' + + # this text appears in the test course's tab + # common/test/data/2014/tabs/8e4cce2b4aaf4ba28b1220804619e41f.html + xml_data = "static 463139" + xml_url = "8e4cce2b4aaf4ba28b1220804619e41f" + @patch.dict('django.conf.settings.FEATURES', {'DISABLE_START_DATES': False}) def test_logged_in_xml(self): self.setup_user()