Skip to content

Commit b5f6db0

Browse files
committed
use helper methods to create client
1 parent 83faeea commit b5f6db0

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

test/asynchronous/test_dns.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ async def run_test(self):
142142
# tests.
143143
copts["tlsAllowInvalidHostnames"] = True
144144

145-
client = AsyncPyMongoTestCase.unmanaged_simple_client(uri, **copts)
145+
client = self.simple_client(uri, **copts)
146146
if client._options.connect:
147147
await client.aconnect()
148148
if num_seeds is not None:
@@ -159,7 +159,6 @@ async def run_test(self):
159159
await client.admin.command("ping")
160160
# XXX: we should block until SRV poller runs at least once
161161
# and re-run these assertions.
162-
await client.close()
163162
else:
164163
try:
165164
parse_uri(uri)

test/test_dns.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ def run_test(self):
142142
# tests.
143143
copts["tlsAllowInvalidHostnames"] = True
144144

145-
client = PyMongoTestCase.unmanaged_simple_client(uri, **copts)
145+
client = self.simple_client(uri, **copts)
146146
if client._options.connect:
147147
client._connect()
148148
if num_seeds is not None:
@@ -157,7 +157,6 @@ def run_test(self):
157157
client.admin.command("ping")
158158
# XXX: we should block until SRV poller runs at least once
159159
# and re-run these assertions.
160-
client.close()
161160
else:
162161
try:
163162
parse_uri(uri)

0 commit comments

Comments
 (0)