Commit d7693d96 by Chris Dodge

unit test should just use direct store. Also remove unused import and logging.

parent 7d206e02
...@@ -265,7 +265,6 @@ class ContentStoreToyCourseTest(ModuleStoreTestCase): ...@@ -265,7 +265,6 @@ class ContentStoreToyCourseTest(ModuleStoreTestCase):
import_from_xml(modulestore(), 'common/test/data/', ['full']) import_from_xml(modulestore(), 'common/test/data/', ['full'])
direct_store = modulestore('direct') direct_store = modulestore('direct')
draft_store = modulestore('draft')
sequential = direct_store.get_item(Location(['i4x', 'edX', 'full', 'sequential', 'Administrivia_and_Circuit_Elements', None])) sequential = direct_store.get_item(Location(['i4x', 'edX', 'full', 'sequential', 'Administrivia_and_Circuit_Elements', None]))
...@@ -282,14 +281,14 @@ class ContentStoreToyCourseTest(ModuleStoreTestCase): ...@@ -282,14 +281,14 @@ class ContentStoreToyCourseTest(ModuleStoreTestCase):
found = False found = False
try: 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 found = True
except ItemNotFoundError: except ItemNotFoundError:
pass pass
self.assertFalse(found) 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 # make sure the parent no longer points to the child object which was deleted
self.assertFalse(sequential.location.url() in chapter.children) self.assertFalse(sequential.location.url() in chapter.children)
......
...@@ -4,8 +4,6 @@ from . import ModuleStoreBase, Location, namedtuple_to_son ...@@ -4,8 +4,6 @@ from . import ModuleStoreBase, Location, namedtuple_to_son
from .exceptions import ItemNotFoundError from .exceptions import ItemNotFoundError
from .inheritance import own_metadata from .inheritance import own_metadata
import logging
DRAFT = 'draft' DRAFT = 'draft'
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment