Skip to content

Commit dd9206a

Browse files
authored
PYTHON-2928 Fix mod_wsgi test failures (#750)
1 parent 6e7b652 commit dd9206a

File tree

1 file changed

+3
-9
lines changed

1 file changed

+3
-9
lines changed

test/mod_wsgi_test/mod_wsgi_test.wsgi

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -29,19 +29,13 @@ from pymongo.hello import HelloCompat
2929
from pymongo.mongo_client import MongoClient
3030

3131
client = MongoClient()
32-
33-
# If the deployment is a replica set, connect to the whole set.
34-
replica_set_name = client.admin.command(HelloCompat.LEGACY_CMD).get('setName')
35-
if replica_set_name:
36-
client = MongoClient(replicaSet=replica_set_name)
37-
3832
collection = client.test.test
39-
4033
ndocs = 20
41-
4234
collection.drop()
4335
collection.insert_many([{'i': i} for i in range(ndocs)])
44-
client.close() # Discard main thread's request socket.
36+
client.close() # Discard main thread's request socket.
37+
client = MongoClient()
38+
collection = client.test.test
4539

4640
try:
4741
from mod_wsgi import version as mod_wsgi_version

0 commit comments

Comments
 (0)