def test_add_to_set_duplicates(self): config = SQLStorageConfiguration() engine = SQLStorageEngine(config) engine.initialise() store = SQLSetsStore(engine) self.assert_add_to_set_duplicates(store)
def test_empty_named(self): config = SQLStorageConfiguration() engine = SQLStorageEngine(config) engine.initialise() store = SQLSetsStore(engine) self.assert_empty_named(store)
def test_upload_csv_files_from_directory_with_subdir(self): config = SQLStorageConfiguration() engine = SQLStorageEngine(config) engine.initialise() store = SQLSetsStore(engine) self.assert_upload_csv_files_from_directory_with_subdir(store)
def test_upload_from_csv_file(self): config = SQLStorageConfiguration() engine = SQLStorageEngine(config) engine.initialise() store = SQLSetsStore(engine) self.assert_upload_from_csv_file(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 sets_store(self): return SQLSetsStore(self)
def test_initialise(self): config = SQLStorageConfiguration() engine = SQLStorageEngine(config) engine.initialise() store = SQLSetsStore(engine) self.assertEqual(store.storage_engine, engine)