Commit f0c52e32 by John Eskew

Merge pull request #7948 from edx/jeskew/PLAT_618_elemental_publish_tests

Add tests for publishing operations and OLX export.
parents c2a0777f 4219086d
......@@ -15,7 +15,6 @@ from opaque_keys.edx.keys import UsageKey
from xblock.core import XBlock
from xmodule.tabs import StaticTab
from xmodule.modulestore import prefer_xmodules, ModuleStoreEnum
from xmodule.modulestore.django import modulestore
from xmodule.x_module import DEPRECATION_VSCOMPAT_EVENT
......@@ -422,7 +421,7 @@ class CourseAboutFactory(XModuleFactory):
"""
user_id = kwargs.pop('user_id', None)
course_id, course_runtime = kwargs.pop("course_id"), kwargs.pop("course_runtime")
store = modulestore()
store = kwargs.pop('modulestore')
for about_key in ABOUT_ATTRIBUTES:
about_item = store.create_xblock(course_runtime, course_id, 'about', about_key)
about_item.data = ABOUT_ATTRIBUTES[about_key]
......
......@@ -10,11 +10,11 @@ from nose.plugins.attrib import attr
from xblock.fields import Reference, ReferenceList, ReferenceValueDict, UNIQUE_ID
from xmodule.modulestore.split_migrator import SplitMigrator
from xmodule.modulestore.tests.test_split_w_old_mongo import SplitWMongoCourseBoostrapper
from xmodule.modulestore.tests.test_split_w_old_mongo import SplitWMongoCourseBootstrapper
@attr('mongo')
class TestMigration(SplitWMongoCourseBoostrapper):
class TestMigration(SplitWMongoCourseBootstrapper):
"""
Test the split migrator
"""
......
......@@ -17,7 +17,7 @@ from xmodule.modulestore.tests.test_cross_modulestore_import_export import Memor
@attr('mongo')
class SplitWMongoCourseBoostrapper(unittest.TestCase):
class SplitWMongoCourseBootstrapper(unittest.TestCase):
"""
Helper for tests which need to construct split mongo & old mongo based courses to get interesting internal structure.
Override _create_course and after invoking the super() _create_course, have it call _create_item for
......@@ -51,7 +51,7 @@ class SplitWMongoCourseBoostrapper(unittest.TestCase):
self.db_config['collection'] = 'modulestore{0}'.format(uuid.uuid4().hex[:5])
self.user_id = random.getrandbits(32)
super(SplitWMongoCourseBoostrapper, self).setUp()
super(SplitWMongoCourseBootstrapper, self).setUp()
self.split_mongo = SplitMongoModuleStore(
None,
self.db_config,
......
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