(self)
| 511 | self.assertEqual(obj, db.dereference(DBRef("test", 4))) |
| 512 | |
| 513 | def test_deref_kwargs(self): |
| 514 | db = self.client.pymongo_test |
| 515 | db.test.drop() |
| 516 | |
| 517 | db.test.insert_one({"_id": 4, "foo": "bar"}) |
| 518 | db = self.client.get_database( |
| 519 | "pymongo_test", codec_options=CodecOptions(document_class=SON[str, Any]) |
| 520 | ) |
| 521 | self.assertEqual( |
| 522 | SON([("foo", "bar")]), db.dereference(DBRef("test", 4), projection={"_id": False}) |
| 523 | ) |
| 524 | |
| 525 | # TODO some of these tests belong in the collection level testing. |
| 526 | def test_insert_find_one(self): |
nothing calls this directly
no test coverage detected