def test_timestamp(self):
    dct = {'ts': Timestamp(4, 13)}
    res = json_util.dumps(dct, default=json_util.default)
    rtdct = json_util.loads(res)
    self.assertEqual(dct, rtdct)
    self.assertEqual('{"ts": {"$timestamp": {"t": 4, "i": 13}}}', res)
def test_timestamp(self):
    dct = {'ts': Timestamp(4, 13)}
    res = json_util.dumps(dct, default=json_util.default)
    rtdct = json_util.loads(res)
    self.assertEqual(dct, rtdct)
    self.assertEqual('{"ts": {"$timestamp": {"t": 4, "i": 13}}}', res)