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

Method test_round_trip

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

Source from the content-addressed store, hash-verified

72
73 @client_context.require_connection
74 def test_round_trip(self):
75 db = self.client.get_database(
76 "pymongo_test", codec_options=CodecOptions(document_class=RawBSONDocument)
77 )
78 db.test_raw.insert_one(self.document)
79 result = db.test_raw.find_one(self.document["_id"])
80 assert result is not None
81 self.assertIsInstance(result, RawBSONDocument)
82 self.assertEqual(dict(self.document.items()), dict(result.items()))
83
84 @client_context.require_connection
85 def test_round_trip_raw_uuid(self):

Callers

nothing calls this directly

Calls 5

CodecOptionsClass · 0.90
itemsMethod · 0.80
get_databaseMethod · 0.45
insert_oneMethod · 0.45
find_oneMethod · 0.45

Tested by

no test coverage detected