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

Method receive_message

test/test_client.py:2261–2268  ·  view source on GitHub ↗
(request_id)

Source from the content-addressed store, hash-verified

2259
2260 # Cause a server error on getmore.
2261 def receive_message(request_id):
2262 # Discard the actual server response.
2263 Connection.receive_message(conn, request_id)
2264
2265 # responseFlags bit 1 is QueryFailure.
2266 msg = struct.pack("<iiiii", 1 << 1, 0, 0, 0, 0)
2267 msg += encode({"$err": "mock err", "code": 0})
2268 return message._OpReply.unpack(msg)
2269
2270 conn.receive_message = receive_message
2271 with self.assertRaises(OperationFailure):

Callers

nothing calls this directly

Calls 2

encodeFunction · 0.90
unpackMethod · 0.45

Tested by

no test coverage detected