From 4e6c53271719b8f9cbd56ff9d213f347dbc837ec Mon Sep 17 00:00:00 2001 From: cahrens Date: Mon, 26 Jan 2015 14:16:39 -0500 Subject: [PATCH] Force usage of the old mongo modulestore. The way that assets are accessed (the usage of _id) seems specific to old mongo and fails with split. --- .../management/commands/tests/test_cleanup_assets.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cms/djangoapps/contentstore/management/commands/tests/test_cleanup_assets.py b/cms/djangoapps/contentstore/management/commands/tests/test_cleanup_assets.py index ca3288307d..e51a34ea2d 100644 --- a/cms/djangoapps/contentstore/management/commands/tests/test_cleanup_assets.py +++ b/cms/djangoapps/contentstore/management/commands/tests/test_cleanup_assets.py @@ -8,6 +8,7 @@ from opaque_keys.edx.locations import SlashSeparatedCourseKey from xmodule.contentstore.content import XASSET_LOCATION_TAG from xmodule.contentstore.django import contentstore from xmodule.modulestore.django import modulestore +from xmodule.modulestore import ModuleStoreEnum from xmodule.modulestore.mongo.base import location_to_query from xmodule.modulestore.tests.django_utils import ModuleStoreTestCase from xmodule.modulestore.xml_importer import import_from_xml @@ -25,7 +26,8 @@ class ExportAllCourses(ModuleStoreTestCase): super(ExportAllCourses, self).setUp() self.content_store = contentstore() - self.module_store = modulestore() + # pylint: disable=protected-access + self.module_store = modulestore()._get_modulestore_by_type(ModuleStoreEnum.Type.mongo) def test_export_all_courses(self): """