From 006cb1aaf786ad8b5d54efeb15bb40f09303a008 Mon Sep 17 00:00:00 2001 From: "A. Jesse Jiryu Davis" Date: Sat, 6 Sep 2014 14:49:15 -0400 Subject: [PATCH] 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. --- test/mod_wsgi_test/mod_wsgi_test_replica_set.wsgi | 5 +++-- test/mod_wsgi_test/mod_wsgi_test_single_server.wsgi | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/test/mod_wsgi_test/mod_wsgi_test_replica_set.wsgi b/test/mod_wsgi_test/mod_wsgi_test_replica_set.wsgi index fef57611a..a43dff146 100644 --- a/test/mod_wsgi_test/mod_wsgi_test_replica_set.wsgi +++ b/test/mod_wsgi_test/mod_wsgi_test_replica_set.wsgi @@ -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' % ( diff --git a/test/mod_wsgi_test/mod_wsgi_test_single_server.wsgi b/test/mod_wsgi_test/mod_wsgi_test_single_server.wsgi index 995bc668a..9285561ca 100644 --- a/test/mod_wsgi_test/mod_wsgi_test_single_server.wsgi +++ b/test/mod_wsgi_test/mod_wsgi_test_single_server.wsgi @@ -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' % (