示例#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 )