'Test that create_library and get_library work regardless of the default modulestore.
Other tests of MixedModulestore support are in test_libraries.py but this one must
be done here so we can test the configuration where Draft/old is the first modulestore.'

@ddt.data(ModuleStoreEnum.Type.mongo, ModuleStoreEnum.Type.split)
def test_get_library(self, default_ms):

    self.initdb(default_ms)
    with self.store.default_store(ModuleStoreEnum.Type.split):
        library = self.store.create_library('org', 'lib', self.user_id, {'display_name': 'Test    Library'})
    library_key = library.location.library_key
    self.assertIsInstance(library_key, LibraryLocator)
    library = self.store.get_library(library_key)
    self.assertEqual(library.location.library_key, library_key)
    self.store.mappings.clear()
    library = self.store.get_library(library_key)
    self.assertEqual(library.location.library_key, library_key)
