Skip to content

Commit

Permalink
fix check
Browse files Browse the repository at this point in the history
  • Loading branch information
blink1073 committed Dec 4, 2024
1 parent 1449f5d commit a40f497
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
8 changes: 6 additions & 2 deletions test/asynchronous/test_encryption.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,11 @@
from pymongo.asynchronous.collection import AsyncCollection
from pymongo.asynchronous.helpers import anext
from pymongo.daemon import _spawn_daemon
from pymongo.ssl_context import _ssl

try:
from pymongo.pyopenssl_context import IS_PYOPENSSL
except ImportError:
IS_PYOPENSSL = False

sys.path[0:0] = [""]

Expand Down Expand Up @@ -2922,7 +2926,7 @@ async def _test(self, provider, master_key):
await self.client_encryption.create_data_key(provider, master_key=master_key)

async def test_kms_retry(self):
if _ssl.IS_PYOPENSSL:
if IS_PYOPENSSL:
self.skipTest(
"PyOpenSSL does not support a required method for this test, Connection.makefile"
)
Expand Down
8 changes: 6 additions & 2 deletions test/test_encryption.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,14 @@
import pytest

from pymongo.daemon import _spawn_daemon
from pymongo.ssl_context import _ssl
from pymongo.synchronous.collection import Collection
from pymongo.synchronous.helpers import next

try:
from pymongo.pyopenssl_context import IS_PYOPENSSL
except ImportError:
IS_PYOPENSSL = False

sys.path[0:0] = [""]

from test import (
Expand Down Expand Up @@ -2904,7 +2908,7 @@ def _test(self, provider, master_key):
self.client_encryption.create_data_key(provider, master_key=master_key)

def test_kms_retry(self):
if _ssl.IS_PYOPENSSL:
if IS_PYOPENSSL:
self.skipTest(
"PyOpenSSL does not support a required method for this test, Connection.makefile"
)
Expand Down

0 comments on commit a40f497

Please sign in to comment.