(
self, collection_with_single_doc: Collection, single_doc: Doc
)
| 427 | @pytest.mark.usefixtures("test_collection") |
| 428 | class TestCollectionFetch: |
| 429 | def test_collection_fetch( |
| 430 | self, collection_with_single_doc: Collection, single_doc: Doc |
| 431 | ): |
| 432 | result = collection_with_single_doc.fetch(ids=[single_doc.id]) |
| 433 | assert bool(result) |
| 434 | assert single_doc.id in result.keys() |
| 435 | |
| 436 | doc = result[single_doc.id] |
| 437 | assert doc is not None |
| 438 | assert doc.id == single_doc.id |
| 439 | assert set(doc.field_names()) == set(single_doc.field_names()) |
| 440 | for field_name in doc.field_names(): |
| 441 | if field_name in ["dense", "sparse"]: |
| 442 | continue |
| 443 | assert doc.field(field_name) == single_doc.field(field_name) |
| 444 | |
| 445 | def test_collection_fetch_contains_nodata_ids( |
| 446 | self, collection_with_multiple_docs: Collection, multiple_docs: list[Doc] |
nothing calls this directly
no test coverage detected