File tree Expand file tree Collapse file tree 2 files changed +7
-4
lines changed
tests/api/routes/collections Expand file tree Collapse file tree 2 files changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -203,7 +203,7 @@ def collection_info(
203203
204204 if include_docs :
205205 document_collection_crud = DocumentCollectionCrud (session )
206- documents = document_collection_crud .read (collection , limit )
206+ documents = document_collection_crud .read (collection , skip = None , limit = limit )
207207
208208 storage = None
209209 if include_url and documents :
Original file line number Diff line number Diff line change @@ -191,7 +191,7 @@ def test_collection_info_include_docs_and_url(
191191 client : TestClient ,
192192 db : Session ,
193193 user_api_key_header ,
194- ):
194+ ) -> None :
195195 """
196196 Test that when include_docs=true and include_url=true,
197197 the endpoint returns documents with their URLs.
@@ -218,6 +218,9 @@ def test_collection_info_include_docs_and_url(
218218 assert isinstance (docs , list )
219219 assert len (docs ) >= 1
220220
221- # Verify document has URL field when include_url=true
222- doc = docs [0 ]
221+ doc_ids = {d ["id" ] for d in docs }
222+ assert str (document .id ) in doc_ids
223+
224+ doc = next (d for d in docs if d ["id" ] == str (document .id ))
225+ assert "signed_url" in doc
223226 assert doc ["signed_url" ].startswith ("https://" )
You can’t perform that action at this time.
0 commit comments