Skip to content

Commit fadef89

Browse files
committed
fix
1 parent 19896a8 commit fadef89

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

test/asynchronous/test_connection_monitoring.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -337,7 +337,7 @@ async def test_2_all_client_pools_have_same_options(self):
337337

338338
async def test_3_uri_connection_pool_options(self):
339339
opts = "&".join([f"{k}={v}" for k, v in self.POOL_OPTIONS.items()])
340-
uri = f"mongodb://{async_client_context.pair}/?{opts}"
340+
uri = f"mongodb://{await async_client_context.pair}/?{opts}"
341341
client = await self.async_rs_or_single_client(uri)
342342
self.addAsyncCleanup(client.close)
343343
pool_opts = (await async_get_pool(client)).opts
@@ -378,7 +378,7 @@ def mock_connect(*args, **kwargs):
378378

379379
pool.connect = mock_connect
380380
# Un-patch Pool.connect to break the cyclic reference.
381-
self.addAsyncCleanup(delattr, pool, "connect")
381+
self.addCleanup(delattr, pool, "connect")
382382

383383
# Attempt to create a new connection.
384384
with self.assertRaisesRegex(ConnectionFailure, "connect failed"):

0 commit comments

Comments
 (0)