From a9caaf0d6a7b40234dfb13720684c914dfd3e633 Mon Sep 17 00:00:00 2001 From: Noah Stapp Date: Mon, 4 Nov 2024 09:24:29 -0500 Subject: [PATCH] =?UTF-8?q?PYTHON-4941=20-=20Fix=20Synchronous=20unified?= =?UTF-8?q?=20test=20runner=20being=20used=20in=20async=E2=80=A6=20(#1993)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- test/asynchronous/test_auth_spec.py | 2 +- test/asynchronous/test_change_stream.py | 2 +- test/asynchronous/test_connection_logging.py | 2 +- test/asynchronous/test_crud_unified.py | 2 +- test/asynchronous/test_encryption.py | 2 +- test/asynchronous/unified_format.py | 2 +- test/unified_format.py | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/test/asynchronous/test_auth_spec.py b/test/asynchronous/test_auth_spec.py index a6ab1cb33..e9e43d575 100644 --- a/test/asynchronous/test_auth_spec.py +++ b/test/asynchronous/test_auth_spec.py @@ -25,7 +25,7 @@ from test.asynchronous import AsyncPyMongoTestCase sys.path[0:0] = [""] from test import unittest -from test.unified_format import generate_test_classes +from test.asynchronous.unified_format import generate_test_classes from pymongo import AsyncMongoClient from pymongo.asynchronous.auth_oidc import OIDCCallback diff --git a/test/asynchronous/test_change_stream.py b/test/asynchronous/test_change_stream.py index 98641f46e..8e16fe752 100644 --- a/test/asynchronous/test_change_stream.py +++ b/test/asynchronous/test_change_stream.py @@ -35,7 +35,7 @@ from test.asynchronous import ( async_client_context, unittest, ) -from test.unified_format import generate_test_classes +from test.asynchronous.unified_format import generate_test_classes from test.utils import ( AllowListEventListener, EventListener, diff --git a/test/asynchronous/test_connection_logging.py b/test/asynchronous/test_connection_logging.py index 6bc9835b7..945c6c59b 100644 --- a/test/asynchronous/test_connection_logging.py +++ b/test/asynchronous/test_connection_logging.py @@ -22,7 +22,7 @@ import sys sys.path[0:0] = [""] from test import unittest -from test.unified_format import generate_test_classes +from test.asynchronous.unified_format import generate_test_classes _IS_SYNC = False diff --git a/test/asynchronous/test_crud_unified.py b/test/asynchronous/test_crud_unified.py index 3d8deb36e..e6f42d5bd 100644 --- a/test/asynchronous/test_crud_unified.py +++ b/test/asynchronous/test_crud_unified.py @@ -22,7 +22,7 @@ import sys sys.path[0:0] = [""] from test import unittest -from test.unified_format import generate_test_classes +from test.asynchronous.unified_format import generate_test_classes _IS_SYNC = False diff --git a/test/asynchronous/test_encryption.py b/test/asynchronous/test_encryption.py index e42c85aa7..767b3ecf0 100644 --- a/test/asynchronous/test_encryption.py +++ b/test/asynchronous/test_encryption.py @@ -46,6 +46,7 @@ from test import ( unittest, ) from test.asynchronous.test_bulk import AsyncBulkTestBase +from test.asynchronous.unified_format import generate_test_classes from test.asynchronous.utils_spec_runner import AsyncSpecRunner from test.helpers import ( AWS_CREDS, @@ -56,7 +57,6 @@ from test.helpers import ( KMIP_CREDS, LOCAL_MASTER_KEY, ) -from test.unified_format import generate_test_classes from test.utils import ( AllowListEventListener, OvertCommandListener, diff --git a/test/asynchronous/unified_format.py b/test/asynchronous/unified_format.py index b382db474..f8179dc0c 100644 --- a/test/asynchronous/unified_format.py +++ b/test/asynchronous/unified_format.py @@ -862,7 +862,7 @@ class UnifiedSpecTestMixinV1(AsyncIntegrationTest): return await target.create_data_key(*args, **kwargs) async def _clientEncryptionOperation_getKeys(self, target, *args, **kwargs): - return await (await target.get_keys(*args, **kwargs)).to_list() + return await target.get_keys(*args, **kwargs).to_list() async def _clientEncryptionOperation_deleteKey(self, target, *args, **kwargs): result = await target.delete_key(*args, **kwargs) diff --git a/test/unified_format.py b/test/unified_format.py index 0da616830..80c37470e 100644 --- a/test/unified_format.py +++ b/test/unified_format.py @@ -858,7 +858,7 @@ class UnifiedSpecTestMixinV1(IntegrationTest): return target.create_data_key(*args, **kwargs) def _clientEncryptionOperation_getKeys(self, target, *args, **kwargs): - return (target.get_keys(*args, **kwargs)).to_list() + return target.get_keys(*args, **kwargs).to_list() def _clientEncryptionOperation_deleteKey(self, target, *args, **kwargs): result = target.delete_key(*args, **kwargs)