'Checks that a course that originally existed in old mongo can be re-imported when
split is the default modulestore.'

def test_existing_course_with_different_modulestore(self):

    with modulestore().default_store(ModuleStoreEnum.Type.mongo):
        call_command('import', self.content_dir, self.good_dir)
    modulestore().mappings = {}
    with modulestore().default_store(ModuleStoreEnum.Type.split):
        call_command('import', self.content_dir, self.good_dir)
        course = modulestore().get_course(self.base_course_key)
        self.assertEqual(unicode(course.location.course_key), unicode(course.children[0].course_key))
