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

Method test_encoding_1

test/test_binary.py:287–290  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

285
286 # Explicit encoding prose test #1
287 def test_encoding_1(self):
288 obj = Binary.from_uuid(self.uuid)
289 expected_obj = Binary(self._hex_to_bytes("00112233445566778899AABBCCDDEEFF"), 4)
290 self.assertEqual(obj, expected_obj)
291
292 def _test_encoding_w_uuid_rep(self, uuid_rep, expected_hexstring, expected_subtype):
293 obj = Binary.from_uuid(self.uuid, uuid_rep)

Callers

nothing calls this directly

Calls 3

_hex_to_bytesMethod · 0.95
BinaryClass · 0.85
from_uuidMethod · 0.80

Tested by

no test coverage detected