From ef8618f7adb0f8e8764703d3b3b4fda799f93af3 Mon Sep 17 00:00:00 2001 From: Don Mitchell Date: Mon, 24 Jun 2013 12:52:50 -0400 Subject: [PATCH] Make DraftModuleStore mongo only DraftModuleStore was originally designed as a mixin, but never used that way, and with the upcoming changes to use the versioned module store, never will be. This changes removes a circular dependency between mongo.py and draft.py. --- common/lib/xmodule/xmodule/modulestore/tests/django_utils.py | 2 +- lms/djangoapps/courseware/tests/tests.py | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/common/lib/xmodule/xmodule/modulestore/tests/django_utils.py b/common/lib/xmodule/xmodule/modulestore/tests/django_utils.py index 6c5c1f66ca..c32d0bca4c 100644 --- a/common/lib/xmodule/xmodule/modulestore/tests/django_utils.py +++ b/common/lib/xmodule/xmodule/modulestore/tests/django_utils.py @@ -48,7 +48,7 @@ def draft_mongo_store_config(data_dir): return { 'default': { - 'ENGINE': 'xmodule.modulestore.mongo.DraftMongoModuleStore', + 'ENGINE': 'xmodule.modulestore.mongo.draft.DraftModuleStore', 'OPTIONS': modulestore_options }, 'direct': { diff --git a/lms/djangoapps/courseware/tests/tests.py b/lms/djangoapps/courseware/tests/tests.py index 17cc848ad3..bbdf97ca9b 100644 --- a/lms/djangoapps/courseware/tests/tests.py +++ b/lms/djangoapps/courseware/tests/tests.py @@ -8,7 +8,6 @@ from django.core.urlresolvers import reverse from django.test.utils import override_settings import xmodule.modulestore.django - from xmodule.error_module import ErrorDescriptor from xmodule.modulestore.django import modulestore from xmodule.modulestore import Location @@ -134,7 +133,7 @@ class TestCoursesLoadTestCase_XmlModulestore(PageLoaderTestCase): def setUp(self): super(TestCoursesLoadTestCase_XmlModulestore, self).setUp() self.setup_user() - xmodule.modulestore.django._MODULESTORES = {} + xmodule.modulestore.django._MODULESTORES.clear() def test_toy_course_loads(self): module_class = 'xmodule.hidden_module.HiddenDescriptor' @@ -155,7 +154,7 @@ class TestCoursesLoadTestCase_MongoModulestore(PageLoaderTestCase): def setUp(self): super(TestCoursesLoadTestCase_MongoModulestore, self).setUp() self.setup_user() - xmodule.modulestore.django._MODULESTORES = {} + xmodule.modulestore.django._MODULESTORES.clear() modulestore().collection.drop() def test_toy_course_loads(self):