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

Method test_empty_doc

test/test_raw_bson.py:58–61  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

56 self.assertEqual(self.bson_string, self.document.raw)
57
58 def test_empty_doc(self):
59 doc = RawBSONDocument(encode({}))
60 with self.assertRaises(KeyError):
61 doc["does-not-exist"]
62
63 def test_invalid_bson_sequence(self):
64 bson_byte_sequence = encode({"a": 1}) + encode({})

Callers

nothing calls this directly

Calls 2

RawBSONDocumentClass · 0.90
encodeFunction · 0.90

Tested by

no test coverage detected