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

Method test_decode_all_kwarg

test/test_bson.py:1333–1340  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1331 self.assertIsInstance(decoded["id"], Binary)
1332
1333 def test_decode_all_kwarg(self):
1334 doc = {"a": uuid.uuid4()}
1335 opts = CodecOptions(uuid_representation=UuidRepresentation.STANDARD)
1336 encoded = encode(doc, codec_options=opts)
1337 # Positional codec_options
1338 self.assertEqual([doc], decode_all(encoded, opts))
1339 # Keyword codec_options
1340 self.assertEqual([doc], decode_all(encoded, codec_options=opts))
1341
1342 def test_unicode_decode_error_handler(self):
1343 enc = encode({"keystr": "foobar"})

Callers

nothing calls this directly

Calls 3

CodecOptionsClass · 0.90
encodeFunction · 0.90
decode_allFunction · 0.90

Tested by

no test coverage detected