def test_upload_from_directory(self): config = SQLStorageConfiguration() engine = SQLStorageEngine(config) engine.initialise() store = SQLCategoryStore(engine) self.assertEqual(store.storage_engine, engine) self.assert_upload_from_directory(store)
def test_category_by_groupid_storage(self): config = SQLStorageConfiguration() engine = SQLStorageEngine(config) engine.initialise() store = SQLCategoryStore(engine) self.assertEqual(store.storage_engine, engine) self.assert_category_by_groupid_storage(store)
def test_empty_named(self): config = SQLStorageConfiguration() engine = SQLStorageEngine(config) engine.initialise() store = SQLCategoryStore(engine) self.assertEqual(store.storage_engine, engine) self.assert_empty_name(store)
def _get_store(storetype, engine): if storetype == 'categories': return SQLCategoryStore(engine) if storetype == 'maps': return SQLMapsStore(engine) if storetype == 'sets': return SQLSetsStore(engine) if storetype == 'rdfs': return SQLRDFsStore(engine) if storetype == 'preprocessors': return SQLPreProcessorsStore(engine) if storetype == 'postprocessors': return SQLPostProcessorsStore(engine) if storetype == 'postquestionprocessors': return SQLPostQuestionProcessorsStore(engine) if storetype == 'templatenodes': return SQLTemplateNodesStore(engine) if storetype == 'patternnodes': return SQLPatternNodesStore(engine) if storetype == 'properties': return SQLPropertyStore(engine) if storetype == 'defaults': return SQLDefaultVariableStore(engine) if storetype == 'regexes': return SQLRegexStore(engine) if storetype == 'denormals': return SQLDenormalStore(engine) if storetype == 'normals': return SQLNormalStore(engine) if storetype == 'genders': return SQLGenderStore(engine) if storetype == 'persons': return SQLPersonStore(engine) if storetype == 'person2s': return SQLPerson2Store(engine) if storetype == 'spelling': return SQLSpellingStore(engine) if storetype == 'licenses': return SQLLicenseKeysStore(engine) if storetype == 'usergroups': return SQLUserGroupStore(engine) if storetype == 'triggers': return SQLTriggersStore(engine) if storetype == 'oobs': return SQLOOBsStore(engine) if storetype == 'services': return SQLServicesStore(engine) raise Exception("Unknown entity storetype [%s]" % storetype)
def category_store(self): return SQLCategoryStore(self)