async def test_doc_update(doc: Document) -> None: assert "test" not in doc doc.update({"test": "value"}) assert "test" in doc assert doc["test"] == "value"
async def test_filled_doc_items_keys_values(doc: Document) -> None: doc.update({"test": "value"}) assert list(doc.keys()) == ["_id", "test"] assert list(doc.values()) == ["foo", "value"] assert dict(doc.items()) == {"_id": "foo", "test": "value"}