|
43 | 43 | from pymongo import AsyncMongoClient, ssl_support
|
44 | 44 | from pymongo.errors import ConfigurationError, ConnectionFailure, OperationFailure
|
45 | 45 | from pymongo.hello import HelloCompat
|
46 |
| -from pymongo.ssl_support import HAVE_SSL, _pyssl, _ssl, get_ssl_context |
| 46 | +from pymongo.ssl_support import HAVE_PYSSL, HAVE_SSL, _ssl, get_ssl_context |
47 | 47 | from pymongo.write_concern import WriteConcern
|
48 | 48 |
|
49 | 49 | _HAVE_PYOPENSSL = False
|
@@ -134,7 +134,7 @@ def test_config_ssl(self):
|
134 | 134 |
|
135 | 135 | @unittest.skipUnless(_HAVE_PYOPENSSL, "PyOpenSSL is not available.")
|
136 | 136 | def test_use_pyopenssl_when_available(self):
|
137 |
| - self.assertTrue(_pyssl.IS_PYOPENSSL) |
| 137 | + self.assertTrue(HAVE_PYSSL) |
138 | 138 |
|
139 | 139 | @unittest.skipUnless(_HAVE_PYOPENSSL, "Cannot test without PyOpenSSL")
|
140 | 140 | def test_load_trusted_ca_certs(self):
|
@@ -177,7 +177,7 @@ async def test_tlsCertificateKeyFilePassword(self):
|
177 | 177 | #
|
178 | 178 | # --sslPEMKeyFile=/path/to/pymongo/test/certificates/server.pem
|
179 | 179 | # --sslCAFile=/path/to/pymongo/test/certificates/ca.pem
|
180 |
| - if not hasattr(ssl, "SSLContext") and not _pyssl.IS_PYOPENSSL: |
| 180 | + if not hasattr(ssl, "SSLContext") and not HAVE_PYSSL: |
181 | 181 | self.assertRaises(
|
182 | 182 | ConfigurationError,
|
183 | 183 | self.simple_client,
|
@@ -378,7 +378,7 @@ async def test_cert_ssl_validation_hostname_matching(self):
|
378 | 378 | @async_client_context.require_tlsCertificateKeyFile
|
379 | 379 | @ignore_deprecations
|
380 | 380 | async def test_tlsCRLFile_support(self):
|
381 |
| - if not hasattr(ssl, "VERIFY_CRL_CHECK_LEAF") or _pyssl.IS_PYOPENSSL: |
| 381 | + if not hasattr(ssl, "VERIFY_CRL_CHECK_LEAF") or HAVE_PYSSL: |
382 | 382 | self.assertRaises(
|
383 | 383 | ConfigurationError,
|
384 | 384 | self.simple_client,
|
|
0 commit comments