diff --git a/cms/djangoapps/contentstore/tests/test_import.py b/cms/djangoapps/contentstore/tests/test_import.py index 005a59ddd5..eeea1f9d4d 100644 --- a/cms/djangoapps/contentstore/tests/test_import.py +++ b/cms/djangoapps/contentstore/tests/test_import.py @@ -13,7 +13,6 @@ from django.test.client import Client from django.test.utils import override_settings from mock import patch -from openedx.core.djangoapps.content.course_structures.tests import SignalDisconnectTestMixin from xmodule.contentstore.django import contentstore from xmodule.exceptions import NotFoundError from xmodule.modulestore import ModuleStoreEnum @@ -30,7 +29,7 @@ TEST_DATA_DIR = settings.COMMON_TEST_DATA_ROOT @ddt.ddt @override_settings(CONTENTSTORE=TEST_DATA_CONTENTSTORE, SEARCH_ENGINE=None) -class ContentStoreImportTest(SignalDisconnectTestMixin, ModuleStoreTestCase): +class ContentStoreImportTest(ModuleStoreTestCase): """ Tests that rely on the toy and test_import_course courses. NOTE: refactor using CourseFactory so they do not. diff --git a/cms/djangoapps/contentstore/tests/test_libraries.py b/cms/djangoapps/contentstore/tests/test_libraries.py index dfeccb82ae..1d8778e79c 100644 --- a/cms/djangoapps/contentstore/tests/test_libraries.py +++ b/cms/djangoapps/contentstore/tests/test_libraries.py @@ -12,7 +12,6 @@ from contentstore.views.item import _duplicate_item from contentstore.views.preview import _load_preview_module from contentstore.views.tests.test_library import LIBRARY_REST_URL from course_creators.views import add_user_with_status_granted -from openedx.core.djangoapps.content.course_structures.tests import SignalDisconnectTestMixin from student import auth from student.auth import has_studio_read_access, has_studio_write_access from student.roles import ( @@ -480,7 +479,7 @@ class TestLibraries(LibraryTestCase): @ddt.ddt @patch('django.conf.settings.SEARCH_ENGINE', None) -class TestLibraryAccess(SignalDisconnectTestMixin, LibraryTestCase): +class TestLibraryAccess(LibraryTestCase): """ Test Roles and Permissions related to Content Libraries """ diff --git a/lms/djangoapps/ccx/tests/test_tasks.py b/lms/djangoapps/ccx/tests/test_tasks.py index f42f237ad3..a2f83cb2d6 100644 --- a/lms/djangoapps/ccx/tests/test_tasks.py +++ b/lms/djangoapps/ccx/tests/test_tasks.py @@ -9,7 +9,6 @@ from ccx_keys.locator import CCXLocator from lms.djangoapps.ccx.tasks import send_ccx_course_published from lms.djangoapps.ccx.tests.factories import CcxFactory from openedx.core.djangoapps.content.course_overviews.models import CourseOverview -from openedx.core.djangoapps.content.course_structures.models import CourseStructure from student.roles import CourseCcxCoachRole from student.tests.factories import AdminFactory from xmodule.modulestore.django import SignalHandler @@ -74,34 +73,6 @@ class TestSendCCXCoursePublished(ModuleStoreTestCase): self.call_fut(self.course.id) self.assertEqual(receiver.call_count, 3) - def test_course_structure_generated(self): - """ - Check that course structure is generated after course published signal is sent - """ - ccx_structure = { - u"blocks": { - u"ccx-block-v1:edX+999+Run_666+ccx@1+type@course+block@course": { - u"block_type": u"course", - u"graded": False, - u"format": None, - u"usage_key": u"ccx-block-v1:edX+999+Run_666+ccx@1+type@course+block@course", - u"children": [ - ], - u"display_name": u"Run 666" - } - }, - u"root": u"ccx-block-v1:edX+999+Run_666+ccx@1+type@course+block@course" - } - course_key = CCXLocator.from_course_locator(self.course.id, self.ccx.id) - structure = CourseStructure.objects.filter(course_id=course_key) - # no structure exists before signal is called - self.assertEqual(len(structure), 0) - with mock_signal_receiver(SignalHandler.course_published) as receiver: - self.call_fut(self.course.id) - self.assertEqual(receiver.call_count, 3) - structure = CourseStructure.objects.get(course_id=course_key) - self.assertEqual(structure.structure, ccx_structure) - def test_course_overview_cached(self): """ Check that course overview is cached after course published signal is sent diff --git a/lms/djangoapps/ccx/utils.py b/lms/djangoapps/ccx/utils.py index f059759fed..8889fb9ad6 100644 --- a/lms/djangoapps/ccx/utils.py +++ b/lms/djangoapps/ccx/utils.py @@ -24,7 +24,6 @@ from lms.djangoapps.instructor.enrollment import enroll_email, get_email_params, from lms.djangoapps.instructor.views.api import _split_input_list from lms.djangoapps.instructor.views.tools import get_student_from_identifier from openedx.core.djangoapps.content.course_overviews.models import CourseOverview -from openedx.core.djangoapps.content.course_structures.models import CourseStructure from student.models import CourseEnrollment, CourseEnrollmentException from student.roles import CourseCcxCoachRole, CourseInstructorRole, CourseStaffRole