refactor: replace usages of XModuleMixin.system with XBlock.runtime
This commit is contained in:
@@ -2460,7 +2460,7 @@ class TestMixedModuleStore(CommonMixedModuleStoreSetup):
|
||||
|
||||
# verify store used for creating a course
|
||||
course = self.store.create_course("org", "course{}".format(uuid4().hex[:5]), "run", self.user_id)
|
||||
assert course.system.modulestore.get_modulestore_type() == store_type
|
||||
assert course.runtime.modulestore.get_modulestore_type() == store_type
|
||||
|
||||
@ddt.data(ModuleStoreEnum.Type.mongo, ModuleStoreEnum.Type.split)
|
||||
def test_default_store(self, default_ms):
|
||||
|
||||
@@ -704,7 +704,7 @@ class SplitModuleCourseTests(SplitModuleTest):
|
||||
locator = CourseLocator(org='testx', course='GreekHero', run="run", branch=BRANCH_NAME_DRAFT)
|
||||
course = modulestore().get_course(locator)
|
||||
block_map = modulestore().cache_items(
|
||||
course.system, [BlockKey.from_usage_key(child) for child in course.children], course.id, depth=3
|
||||
course.runtime, [BlockKey.from_usage_key(child) for child in course.children], course.id, depth=3
|
||||
)
|
||||
assert BlockKey('chapter', 'chapter1') in block_map
|
||||
assert BlockKey('problem', 'problem3_2') in block_map
|
||||
@@ -719,14 +719,14 @@ class SplitModuleCourseTests(SplitModuleTest):
|
||||
master_branch=ModuleStoreEnum.BranchName.draft
|
||||
)
|
||||
test_chapter = modulestore().create_xblock(
|
||||
test_course.system, test_course.id, 'chapter', fields={'display_name': 'chapter n'},
|
||||
test_course.runtime, test_course.id, 'chapter', fields={'display_name': 'chapter n'},
|
||||
parent_xblock=test_course
|
||||
)
|
||||
assert test_chapter.display_name == 'chapter n'
|
||||
test_def_content = '<problem>boo</problem>'
|
||||
# create child
|
||||
new_block = modulestore().create_xblock(
|
||||
test_course.system, test_course.id,
|
||||
test_course.runtime, test_course.id,
|
||||
'problem',
|
||||
fields={
|
||||
'data': test_def_content,
|
||||
|
||||
Reference in New Issue
Block a user