-
Type: Bug
-
Resolution: Done
-
Priority: Minor - P4
-
Affects Version/s: 2.5.1
-
Component/s: None
-
None
Initialize an unconnected MongoClient with the wrong password, then do an operation that triggers it to connect and authenticate:
c = MongoClient(
"mongodb://user:wrong@%s:%d/pymongo_test" % (host, port),
_connect=False)
c.pymongo_test.test.find_one()
Expected: OperationFailure. Actual: AutoReconnect.
MongoReplicaSetClient handles this case correctly.
I revealed this bug in the process of fixing PYTHON-516. The fix is moderate-risk, low-reward, so I'm putting it off until PyMongo 2.6.