MCPcopy Index your code
hub / github.com/mongodb/mongo-python-driver / test_timestamp

Method test_timestamp

test/test_json_util.py:401–406  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

399 self.round_trip({"m": MaxKey()})
400
401 def test_timestamp(self):
402 dct = {"ts": Timestamp(4, 13)}
403 res = json_util.dumps(dct, default=json_util.default)
404 rtdct = json_util.loads(res)
405 self.assertEqual(dct, rtdct)
406 self.assertEqual('{"ts": {"$timestamp": {"t": 4, "i": 13}}}', res)
407
408 def test_uuid_default(self):
409 # Cannot directly encode native UUIDs with the default

Callers

nothing calls this directly

Calls 1

TimestampClass · 0.90

Tested by

no test coverage detected