'Initialize the database and create one test course in it'

def initdb(self, default):

    store_configs = self.options['stores']
    for index in range(len(store_configs)):
        if (store_configs[index]['NAME'] == default):
            if (index > 0):
                (store_configs[index], store_configs[0]) = (store_configs[0], store_configs[index])
            break
    self._initialize_mixed()
    test_course_key = CourseLocator.from_string(self.MONGO_COURSEID)
    test_course_key = test_course_key.make_usage_key('course', test_course_key.run).course_key
    self.fake_location = self.store.make_course_key(test_course_key.org, test_course_key.course, test_course_key.run).make_usage_key('vertical', 'fake')
    self._create_course(test_course_key)
    self.assertEquals(default, self.store.get_modulestore_type(self.course.id))
