This commit is contained in:
Malte Pietsch 2020-01-23 09:18:15 +01:00
parent d564026a57
commit 8a48cd7dd6

View File

@ -7,4 +7,5 @@ def test_db_write_read():
write_documents_to_db(datastore=sql_datastore, document_dir="samples/docs")
documents = sql_datastore.get_all_documents()
assert len(documents) == 2
assert documents[0]["text"] == 'A Doc specifically talking about haystack.\nHaystack can be used to scale QA models to large document collections.'
doc = sql_datastore.get_document_by_id("1")
assert doc["text"] == 'A Doc specifically talking about haystack.\nHaystack can be used to scale QA models to large document collections.'