PYTHON-989 - Fix find_one_and_write_concern test when run with authentication.

This commit is contained in:
Luke Lovett 2015-11-18 16:49:48 -08:00
parent 0d274781db
commit 29df784185

View File

@ -2003,6 +2003,9 @@ class TestCollection(IntegrationTest):
# default WriteConcern.
c_default = db.get_collection('test', write_concern=WriteConcern())
results = listener.results
# Authenticate the client and throw out auth commands from the listener.
db.command('ismaster')
results.clear()
try:
if client_context.version.at_least(3, 1, 9, -1):
c_w0.find_and_modify(