def test_process_line_verbose(self): config = SQLStorageConfiguration() engine = SQLStorageEngine(config) engine.initialise() store = SQLPersonStore(engine) store.empty() store.process_line("test", ["field1", "field2"], verbose=True) store.process_line("test", ["field1", "field2"], verbose=False)
def test_get_lookup_not_present(self): config = SQLStorageConfiguration() engine = SQLStorageEngine(config) engine.initialise() store = SQLPersonStore(engine) store.empty() collection = store.get_lookup() self.assertEquals({}, collection)
def test_upload_from_file_add_document_false(self): config = SQLStorageConfiguration() engine = SQLStorageEngine(config) engine.initialise() store = SQLPersonStore(engine) store.empty() count, success = store.upload_from_file("lookups.txtx") self.assertEqual(0, count) self.assertEqual(0, success)
def test_get_lookup_present(self): config = SQLStorageConfiguration() engine = SQLStorageEngine(config) engine.initialise() store = SQLPersonStore(engine) store.empty() store.add_to_lookup("key1", "value1", overwrite_existing=True) collection = store.get_lookup() self.assertIsNotNone(collection )