diff --git a/test/asynchronous/test_ssl.py b/test/asynchronous/test_ssl.py index d920b77ac2..4d7566a61d 100644 --- a/test/asynchronous/test_ssl.py +++ b/test/asynchronous/test_ssl.py @@ -166,11 +166,14 @@ async def asyncTearDown(self): @async_client_context.require_tls async def test_simple_ssl(self): + if "PyPy" in sys.version: + self.skipTest("Test is flaky on PyPy") # Expects the server to be running with ssl and with # no --sslPEMKeyFile or with --sslWeakCertificateValidation await self.assertClientWorks(self.client) @async_client_context.require_tlsCertificateKeyFile + @async_client_context.require_no_api_version @ignore_deprecations async def test_tlsCertificateKeyFilePassword(self): # Expects the server to be running with server.pem and ca.pem @@ -376,6 +379,7 @@ async def test_cert_ssl_validation_hostname_matching(self): ) @async_client_context.require_tlsCertificateKeyFile + @async_client_context.require_no_api_version @ignore_deprecations async def test_tlsCRLFile_support(self): if not hasattr(ssl, "VERIFY_CRL_CHECK_LEAF") or _ssl.IS_PYOPENSSL: @@ -531,6 +535,7 @@ def test_wincertstore(self): @async_client_context.require_auth @async_client_context.require_tlsCertificateKeyFile + @async_client_context.require_no_api_version @ignore_deprecations async def test_mongodb_x509_auth(self): host, port = await async_client_context.host, await async_client_context.port @@ -640,6 +645,7 @@ async def test_mongodb_x509_auth(self): self.fail("Invalid certificate accepted.") @async_client_context.require_tlsCertificateKeyFile + @async_client_context.require_no_api_version @ignore_deprecations async def test_connect_with_ca_bundle(self): def remove(path): diff --git a/test/test_ssl.py b/test/test_ssl.py index a66fe21be5..7decc8203d 100644 --- a/test/test_ssl.py +++ b/test/test_ssl.py @@ -166,11 +166,14 @@ def tearDown(self): @client_context.require_tls def test_simple_ssl(self): + if "PyPy" in sys.version: + self.skipTest("Test is flaky on PyPy") # Expects the server to be running with ssl and with # no --sslPEMKeyFile or with --sslWeakCertificateValidation self.assertClientWorks(self.client) @client_context.require_tlsCertificateKeyFile + @client_context.require_no_api_version @ignore_deprecations def test_tlsCertificateKeyFilePassword(self): # Expects the server to be running with server.pem and ca.pem @@ -376,6 +379,7 @@ def test_cert_ssl_validation_hostname_matching(self): ) @client_context.require_tlsCertificateKeyFile + @client_context.require_no_api_version @ignore_deprecations def test_tlsCRLFile_support(self): if not hasattr(ssl, "VERIFY_CRL_CHECK_LEAF") or _ssl.IS_PYOPENSSL: @@ -531,6 +535,7 @@ def test_wincertstore(self): @client_context.require_auth @client_context.require_tlsCertificateKeyFile + @client_context.require_no_api_version @ignore_deprecations def test_mongodb_x509_auth(self): host, port = client_context.host, client_context.port @@ -640,6 +645,7 @@ def test_mongodb_x509_auth(self): self.fail("Invalid certificate accepted.") @client_context.require_tlsCertificateKeyFile + @client_context.require_no_api_version @ignore_deprecations def test_connect_with_ca_bundle(self): def remove(path):