def initdb(): # connect to the db _options = {} _options.update(OPTIONS) store = MixedModuleStore(**_options) import_from_xml(store._get_modulestore_for_courseid(IMPORT_COURSEID), DATA_DIR, ['toy'], target_location_namespace=Location( 'i4x', TestMixedModuleStore.import_org, TestMixedModuleStore.import_course, 'course', TestMixedModuleStore.import_run)) return store
def initdb(): # connect to the db _options = {} _options.update(OPTIONS) store = MixedModuleStore(**_options) import_from_xml( store._get_modulestore_for_courseid(IMPORT_COURSEID), DATA_DIR, ['toy'], target_location_namespace=Location( 'i4x', TestMixedModuleStore.import_org, TestMixedModuleStore.import_course, 'course', TestMixedModuleStore.import_run ) ) return store
def initdb(): """ Initialize the database and import one test course into it """ # connect to the db _options = {} _options.update(OPTIONS) store = MixedModuleStore(**_options) import_from_xml( store._get_modulestore_for_courseid(IMPORT_COURSEID), DATA_DIR, ["toy"], target_location_namespace=Location( "i4x", TestMixedModuleStore.import_org, TestMixedModuleStore.import_course, "course", TestMixedModuleStore.import_run, ), ) return store