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

Method test_binary_str_equivalence

test/test_objectid.py:84–87  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

82 self.assertFalse(ObjectId(b"123456789012") != ObjectId(b"123456789012"))
83
84 def test_binary_str_equivalence(self):
85 a = ObjectId()
86 self.assertEqual(a, ObjectId(a.binary))
87 self.assertEqual(a, ObjectId(str(a)))
88
89 def test_generation_time(self):
90 d1 = datetime.datetime.now(tz=datetime.timezone.utc).replace(tzinfo=None)

Callers

nothing calls this directly

Calls 1

ObjectIdClass · 0.90

Tested by

no test coverage detected