@@ -69,7 +69,7 @@ def get_course(self, name):
6969 modulestore = XMLModuleStore (
7070 DATA_DIR ,
7171 source_dirs = [name ],
72- xblock_mixins = (InheritanceMixin ,),
72+ xblock_mixins = (InheritanceMixin , XModuleMixin ),
7373 )
7474 courses = modulestore .get_courses ()
7575 assert len (courses ) == 1
@@ -461,7 +461,7 @@ def test_policy_loading(self):
461461 def test_static_tabs_import (self ):
462462 """Make sure that the static tabs are imported correctly"""
463463
464- modulestore = XMLModuleStore (DATA_DIR , source_dirs = ['toy' ])
464+ modulestore = XMLModuleStore (DATA_DIR , source_dirs = ['toy' ], xblock_mixins = ( XModuleMixin ,) )
465465
466466 location_tab_syllabus = BlockUsageLocator (CourseLocator ("edX" , "toy" , "2012_Fall" , deprecated = True ),
467467 "static_tab" , "syllabus" , deprecated = True )
@@ -483,7 +483,7 @@ def test_definition_loading(self):
483483 happen--locations should uniquely name definitions. But in
484484 our imperfect XML world, it can (and likely will) happen."""
485485
486- modulestore = XMLModuleStore (DATA_DIR , source_dirs = ['toy' , 'two_toys' ])
486+ modulestore = XMLModuleStore (DATA_DIR , source_dirs = ['toy' , 'two_toys' ], xblock_mixins = ( XModuleMixin ,) )
487487
488488 location = BlockUsageLocator (CourseLocator ("edX" , "toy" , "2012_Fall" , deprecated = True ),
489489 "video" , "Welcome" , deprecated = True )
@@ -499,7 +499,7 @@ def test_colon_in_url_name(self):
499499
500500 print ("Starting import" )
501501 # Not using get_courses because we need the modulestore object too afterward
502- modulestore = XMLModuleStore (DATA_DIR , source_dirs = ['toy' ])
502+ modulestore = XMLModuleStore (DATA_DIR , source_dirs = ['toy' ], xblock_mixins = ( XModuleMixin ,) )
503503 courses = modulestore .get_courses ()
504504 assert len (courses ) == 1
505505 course = courses [0 ]
@@ -533,7 +533,7 @@ def test_unicode(self):
533533 exceptions/errors to that effect."""
534534
535535 print ("Starting import" )
536- modulestore = XMLModuleStore (DATA_DIR , source_dirs = ['test_unicode' ])
536+ modulestore = XMLModuleStore (DATA_DIR , source_dirs = ['test_unicode' ], xblock_mixins = ( XModuleMixin ,) )
537537 courses = modulestore .get_courses ()
538538 assert len (courses ) == 1
539539 course = courses [0 ]
@@ -553,7 +553,7 @@ def test_url_name_mangling(self):
553553 Make sure that url_names are only mangled once.
554554 """
555555
556- modulestore = XMLModuleStore (DATA_DIR , source_dirs = ['toy' ])
556+ modulestore = XMLModuleStore (DATA_DIR , source_dirs = ['toy' ], xblock_mixins = ( XModuleMixin ,) )
557557
558558 toy_id = CourseKey .from_string ('edX/toy/2012_Fall' )
559559
@@ -571,7 +571,7 @@ def test_url_name_mangling(self):
571571 assert len (video .usage_key .block_id ) == (len ('video_' ) + 12 )
572572
573573 def test_poll_and_conditional_import (self ):
574- modulestore = XMLModuleStore (DATA_DIR , source_dirs = ['conditional_and_poll' ])
574+ modulestore = XMLModuleStore (DATA_DIR , source_dirs = ['conditional_and_poll' ], xblock_mixins = ( XModuleMixin ,) )
575575
576576 course = modulestore .get_courses ()[0 ]
577577 chapters = course .get_children ()
@@ -624,7 +624,7 @@ def test_cohort_config(self):
624624 Note: The cohort config on the CourseBlock is no longer used.
625625 See openedx.core.djangoapps.course_groups.models.CourseCohortSettings.
626626 """
627- modulestore = XMLModuleStore (DATA_DIR , source_dirs = ['toy' ])
627+ modulestore = XMLModuleStore (DATA_DIR , source_dirs = ['toy' ], xblock_mixins = ( XModuleMixin ,) )
628628
629629 toy_id = CourseKey .from_string ('edX/toy/2012_Fall' )
630630
0 commit comments