예제 #1
0
    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)
예제 #2
0
    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)
예제 #3
0
    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)
예제 #4
0
    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 )