Skip to content

Commit b898826

Browse files
committed
Remove unneeded reset_async_client_context
1 parent cdc2cf0 commit b898826

File tree

4 files changed

+0
-22
lines changed

4 files changed

+0
-22
lines changed

test/__init__.py

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -864,16 +864,6 @@ def max_message_size_bytes(self):
864864
client_context = ClientContext()
865865

866866

867-
def reset_client_context():
868-
if _IS_SYNC:
869-
# sync tests don't need to reset a client context
870-
return
871-
elif client_context.client is not None:
872-
client_context.client.close()
873-
client_context.client = None
874-
client_context._init_client()
875-
876-
877867
class PyMongoTestCase(unittest.TestCase):
878868
def assertEqualCommand(self, expected, actual, msg=None):
879869
self.assertEqual(sanitize_cmd(expected), sanitize_cmd(actual), msg)

test/asynchronous/__init__.py

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -866,16 +866,6 @@ async def max_message_size_bytes(self):
866866
async_client_context = AsyncClientContext()
867867

868868

869-
async def reset_client_context():
870-
if _IS_SYNC:
871-
# sync tests don't need to reset a client context
872-
return
873-
elif async_client_context.client is not None:
874-
await async_client_context.client.close()
875-
async_client_context.client = None
876-
await async_client_context._init_client()
877-
878-
879869
class AsyncPyMongoTestCase(unittest.IsolatedAsyncioTestCase):
880870
def assertEqualCommand(self, expected, actual, msg=None):
881871
self.assertEqual(sanitize_cmd(expected), sanitize_cmd(actual), msg)

test/asynchronous/test_connections_survive_primary_stepdown_spec.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@
2222
from test.asynchronous import (
2323
AsyncIntegrationTest,
2424
async_client_context,
25-
reset_client_context,
2625
unittest,
2726
)
2827
from test.asynchronous.helpers import async_repl_set_step_down

test/test_connections_survive_primary_stepdown_spec.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@
2222
from test import (
2323
IntegrationTest,
2424
client_context,
25-
reset_client_context,
2625
unittest,
2726
)
2827
from test.helpers import repl_set_step_down

0 commit comments

Comments
 (0)