PYTHON-525 Don't use auto_start_request in mod_wsgi tests.

auto_start_request is gone from the new MongoClient and is about to be
removed from MongoReplicaSetClient.
This commit is contained in:
A. Jesse Jiryu Davis 2014-09-06 14:49:15 -04:00
parent c33c03078e
commit 006cb1aaf7
2 changed files with 6 additions and 4 deletions

View File

@ -28,8 +28,7 @@ sys.path.insert(0, repository_path)
import pymongo
from pymongo.mongo_replica_set_client import MongoReplicaSetClient
# auto_start_request is part of the PYTHON-353 pathology
client = MongoReplicaSetClient(replicaSet='repl0', auto_start_request=True)
client = MongoReplicaSetClient(replicaSet='repl0')
collection = client.test.test
ndocs = 20
@ -45,6 +44,8 @@ except:
def application(environ, start_response):
# Requests are part of the PYTHON-353 pathology.
client.start_request()
results = list(collection.find().batch_size(10))
assert len(results) == ndocs
output = 'python %s, mod_wsgi %s, pymongo %s' % (

View File

@ -27,8 +27,7 @@ sys.path.insert(0, repository_path)
import pymongo
from pymongo.mongo_client import MongoClient
# auto_start_request is part of the PYTHON-353 pathology
client = MongoClient(auto_start_request=True)
client = MongoClient()
collection = client.test.test
ndocs = 20
@ -44,6 +43,8 @@ except:
def application(environ, start_response):
# Requests are part of the PYTHON-353 pathology.
client.start_request()
results = list(collection.find().batch_size(10))
assert len(results) == ndocs
output = 'python %s, mod_wsgi %s, pymongo %s' % (