Skip to content

Commit 9349d90

Browse files
committed
Merge branch 'master' of github.com:mongodb/mongo-python-driver
2 parents 6a12533 + dfb6a9a commit 9349d90

File tree

2 files changed

+34
-1
lines changed

2 files changed

+34
-1
lines changed

test/crud/unified/client-bulkWrite-partialResults.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -486,7 +486,7 @@
486486
]
487487
},
488488
{
489-
"description": "partialResult is set when first operation fails during an unordered bulk write (summary)",
489+
"description": "partialResult is set when second operation fails during an unordered bulk write (summary)",
490490
"operations": [
491491
{
492492
"object": "client0",

test/mockupdb/test_handshake.py

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -229,6 +229,39 @@ def test_client_handshake_saslSupportedMechs(self):
229229
future()
230230
return
231231

232+
def test_client_handshake_saslSupportedMechs_unknown(self):
233+
server = MockupDB()
234+
server.run()
235+
self.addCleanup(server.stop)
236+
237+
primary_response = OpReply(
238+
"ismaster",
239+
True,
240+
minWireVersion=2,
241+
maxWireVersion=MIN_SUPPORTED_WIRE_VERSION,
242+
saslSupportedMechs=["SCRAM-SHA-256", "does_not_exist"],
243+
)
244+
client = MongoClient(
245+
server.uri, authmechanism="PLAIN", username="username", password="password"
246+
)
247+
248+
self.addCleanup(client.close)
249+
250+
# New monitoring connections send data during handshake.
251+
heartbeat = server.receives("ismaster")
252+
heartbeat.ok(primary_response)
253+
254+
future = go(client.db.command, "whatever")
255+
for request in server:
256+
if request.matches("ismaster"):
257+
request.ok(primary_response)
258+
elif request.matches("saslStart"):
259+
request.ok("saslStart", True, conversationId=1, payload=b"", done=True, ok=1)
260+
else:
261+
request.ok()
262+
future()
263+
return
264+
232265
def test_handshake_load_balanced(self):
233266
self.hello_with_option_helper(OpMsg, loadBalanced=True)
234267
with self.assertRaisesRegex(AssertionError, "does not match"):

0 commit comments

Comments
 (0)