(self)
| 109 | self.round_trip({"id": ObjectId()}) |
| 110 | |
| 111 | def test_dbref(self): |
| 112 | self.round_trip({"ref": DBRef("foo", 5)}) |
| 113 | self.round_trip({"ref": DBRef("foo", 5, "db")}) |
| 114 | self.round_trip({"ref": DBRef("foo", ObjectId())}) |
| 115 | |
| 116 | # Check order. |
| 117 | self.assertEqual( |
| 118 | '{"$ref": "collection", "$id": 1, "$db": "db"}', |
| 119 | json_util.dumps(DBRef("collection", 1, "db")), |
| 120 | ) |
| 121 | |
| 122 | def test_datetime(self): |
| 123 | tz_aware_opts = json_util.DEFAULT_JSON_OPTIONS.with_options(tz_aware=True) |
nothing calls this directly
no test coverage detected