Skip to content

Commit 006cb1a

Browse files
committed
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.
1 parent c33c030 commit 006cb1a

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

test/mod_wsgi_test/mod_wsgi_test_replica_set.wsgi

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,7 @@ sys.path.insert(0, repository_path)
2828
import pymongo
2929
from pymongo.mongo_replica_set_client import MongoReplicaSetClient
3030

31-
# auto_start_request is part of the PYTHON-353 pathology
32-
client = MongoReplicaSetClient(replicaSet='repl0', auto_start_request=True)
31+
client = MongoReplicaSetClient(replicaSet='repl0')
3332
collection = client.test.test
3433

3534
ndocs = 20
@@ -45,6 +44,8 @@ except:
4544

4645

4746
def application(environ, start_response):
47+
# Requests are part of the PYTHON-353 pathology.
48+
client.start_request()
4849
results = list(collection.find().batch_size(10))
4950
assert len(results) == ndocs
5051
output = 'python %s, mod_wsgi %s, pymongo %s' % (

test/mod_wsgi_test/mod_wsgi_test_single_server.wsgi

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,7 @@ sys.path.insert(0, repository_path)
2727
import pymongo
2828
from pymongo.mongo_client import MongoClient
2929

30-
# auto_start_request is part of the PYTHON-353 pathology
31-
client = MongoClient(auto_start_request=True)
30+
client = MongoClient()
3231
collection = client.test.test
3332

3433
ndocs = 20
@@ -44,6 +43,8 @@ except:
4443

4544

4645
def application(environ, start_response):
46+
# Requests are part of the PYTHON-353 pathology.
47+
client.start_request()
4748
results = list(collection.find().batch_size(10))
4849
assert len(results) == ndocs
4950
output = 'python %s, mod_wsgi %s, pymongo %s' % (

0 commit comments

Comments
 (0)