diff --git a/test/test_db.py b/test/test_db.py index f6d67cd1a..437806a43 100644 --- a/test/test_db.py +++ b/test/test_db.py @@ -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.'