(self)
| 109 | self.assertEqual(as_utc, oid.generation_time) |
| 110 | |
| 111 | def test_pickling(self): |
| 112 | orig = ObjectId() |
| 113 | for protocol in [0, 1, 2, -1]: |
| 114 | pkl = pickle.dumps(orig, protocol=protocol) |
| 115 | self.assertEqual(orig, pickle.loads(pkl)) |
| 116 | |
| 117 | def test_pickle_backwards_compatability(self): |
| 118 | # This string was generated by pickling an ObjectId in pymongo |