From d7693d96b7720d2f4913ce63625b7c67e9533581 Mon Sep 17 00:00:00 2001 From: Chris Dodge Date: Mon, 29 Apr 2013 09:18:49 -0400 Subject: [PATCH] unit test should just use direct store. Also remove unused import and logging. --- cms/djangoapps/contentstore/tests/test_contentstore.py | 5 ++--- common/lib/xmodule/xmodule/modulestore/draft.py | 2 -- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/cms/djangoapps/contentstore/tests/test_contentstore.py b/cms/djangoapps/contentstore/tests/test_contentstore.py index f4926acc29..07b7032e60 100644 --- a/cms/djangoapps/contentstore/tests/test_contentstore.py +++ b/cms/djangoapps/contentstore/tests/test_contentstore.py @@ -265,7 +265,6 @@ class ContentStoreToyCourseTest(ModuleStoreTestCase): import_from_xml(modulestore(), 'common/test/data/', ['full']) direct_store = modulestore('direct') - draft_store = modulestore('draft') sequential = direct_store.get_item(Location(['i4x', 'edX', 'full', 'sequential', 'Administrivia_and_Circuit_Elements', None])) @@ -282,14 +281,14 @@ class ContentStoreToyCourseTest(ModuleStoreTestCase): found = False try: - draft_store.get_item(Location(['i4x', 'edX', 'full', 'sequential', 'Administrivia_and_Circuit_Elements', None])) + direct_store.get_item(Location(['i4x', 'edX', 'full', 'sequential', 'Administrivia_and_Circuit_Elements', None])) found = True except ItemNotFoundError: pass self.assertFalse(found) - chapter = draft_store.get_item(Location(['i4x', 'edX', 'full', 'chapter', 'Week_1', None])) + chapter = direct_store.get_item(Location(['i4x', 'edX', 'full', 'chapter', 'Week_1', None])) # make sure the parent no longer points to the child object which was deleted self.assertFalse(sequential.location.url() in chapter.children) diff --git a/common/lib/xmodule/xmodule/modulestore/draft.py b/common/lib/xmodule/xmodule/modulestore/draft.py index d7300e1730..c3f1b23688 100644 --- a/common/lib/xmodule/xmodule/modulestore/draft.py +++ b/common/lib/xmodule/xmodule/modulestore/draft.py @@ -4,8 +4,6 @@ from . import ModuleStoreBase, Location, namedtuple_to_son from .exceptions import ItemNotFoundError from .inheritance import own_metadata -import logging - DRAFT = 'draft'