diff --git a/test/asynchronous/test_client_bulk_write.py b/test/asynchronous/test_client_bulk_write.py index 01294402de..a82629f495 100644 --- a/test/asynchronous/test_client_bulk_write.py +++ b/test/asynchronous/test_client_bulk_write.py @@ -102,6 +102,7 @@ async def test_raw_bson_not_inflated(self): # https://github.com/mongodb/specifications/tree/master/source/crud/tests class TestClientBulkWriteCRUD(AsyncIntegrationTest): async def asyncSetUp(self): + await super().asyncSetUp() self.max_write_batch_size = await async_client_context.max_write_batch_size self.max_bson_object_size = await async_client_context.max_bson_size self.max_message_size_bytes = await async_client_context.max_message_size_bytes @@ -652,6 +653,7 @@ class TestClientBulkWriteCSOT(AsyncIntegrationTest): async def asyncSetUp(self): if os.environ.get("SKIP_CSOT_TESTS", ""): raise unittest.SkipTest("SKIP_CSOT_TESTS is set, skipping...") + await super().asyncSetUp() self.max_write_batch_size = await async_client_context.max_write_batch_size self.max_bson_object_size = await async_client_context.max_bson_size self.max_message_size_bytes = await async_client_context.max_message_size_bytes diff --git a/test/asynchronous/test_connections_survive_primary_stepdown_spec.py b/test/asynchronous/test_connections_survive_primary_stepdown_spec.py index bc9638b443..4795d3937a 100644 --- a/test/asynchronous/test_connections_survive_primary_stepdown_spec.py +++ b/test/asynchronous/test_connections_survive_primary_stepdown_spec.py @@ -46,6 +46,7 @@ class TestAsyncConnectionsSurvivePrimaryStepDown(AsyncIntegrationTest): @async_client_context.require_replica_set async def asyncSetUp(self): + await super().asyncSetUp() self.listener = CMAPListener() self.client = await self.async_rs_or_single_client( event_listeners=[self.listener], retryWrites=False, heartbeatFrequencyMS=500 diff --git a/test/test_client_bulk_write.py b/test/test_client_bulk_write.py index f06c07d588..c1cc27c28a 100644 --- a/test/test_client_bulk_write.py +++ b/test/test_client_bulk_write.py @@ -102,6 +102,7 @@ def test_raw_bson_not_inflated(self): # https://github.com/mongodb/specifications/tree/master/source/crud/tests class TestClientBulkWriteCRUD(IntegrationTest): def setUp(self): + super().setUp() self.max_write_batch_size = client_context.max_write_batch_size self.max_bson_object_size = client_context.max_bson_size self.max_message_size_bytes = client_context.max_message_size_bytes @@ -648,6 +649,7 @@ class TestClientBulkWriteCSOT(IntegrationTest): def setUp(self): if os.environ.get("SKIP_CSOT_TESTS", ""): raise unittest.SkipTest("SKIP_CSOT_TESTS is set, skipping...") + super().setUp() self.max_write_batch_size = client_context.max_write_batch_size self.max_bson_object_size = client_context.max_bson_size self.max_message_size_bytes = client_context.max_message_size_bytes diff --git a/test/test_connections_survive_primary_stepdown_spec.py b/test/test_connections_survive_primary_stepdown_spec.py index 84ef6decd5..1fb08cbed5 100644 --- a/test/test_connections_survive_primary_stepdown_spec.py +++ b/test/test_connections_survive_primary_stepdown_spec.py @@ -46,6 +46,7 @@ class TestConnectionsSurvivePrimaryStepDown(IntegrationTest): @client_context.require_replica_set def setUp(self): + super().setUp() self.listener = CMAPListener() self.client = self.rs_or_single_client( event_listeners=[self.listener], retryWrites=False, heartbeatFrequencyMS=500 diff --git a/test/test_gridfs.py b/test/test_gridfs.py index a36109f399..ab8950250b 100644 --- a/test/test_gridfs.py +++ b/test/test_gridfs.py @@ -511,6 +511,7 @@ def setUp(self): super().setUp() @classmethod + @client_context.require_connection def tearDownClass(cls): client_context.client.drop_database("gfsreplica") diff --git a/test/test_gridfs_bucket.py b/test/test_gridfs_bucket.py index 04c7427350..0af4dce811 100644 --- a/test/test_gridfs_bucket.py +++ b/test/test_gridfs_bucket.py @@ -481,6 +481,7 @@ def setUp(self): super().setUp() @classmethod + @client_context.require_connection def tearDownClass(cls): client_context.client.drop_database("gfsbucketreplica")