diff options
author | Chayim <chayim@users.noreply.github.com> | 2021-12-26 15:02:43 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-12-26 15:02:43 +0200 |
commit | b426d0d41cc28f1b0f6ec7092cfb819ce00a6e16 (patch) | |
tree | 2ebb0f286a7d94cad3e6489ca9cd442f593df6a1 /tests/conftest.py | |
parent | f03d008ba226c698e266158012b47b348b89b503 (diff) | |
download | redis-py-b426d0d41cc28f1b0f6ec7092cfb819ce00a6e16.tar.gz |
OCSP stapling support (#1820)
Diffstat (limited to 'tests/conftest.py')
-rw-r--r-- | tests/conftest.py | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/conftest.py b/tests/conftest.py index 0149166..505a6e4 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -170,6 +170,24 @@ def skip_ifnot_redis_enterprise(): return pytest.mark.skipif(check, reason="Not running in redis enterprise") +def skip_if_nocryptography(): + try: + import cryptography # noqa + + return pytest.mark.skipif(False, reason="Cryptography dependency found") + except ImportError: + return pytest.mark.skipif(True, reason="No cryptography dependency") + + +def skip_if_cryptography(): + try: + import cryptography # noqa + + return pytest.mark.skipif(True, reason="Cryptography dependency found") + except ImportError: + return pytest.mark.skipif(False, reason="No cryptography dependency") + + def _get_client( cls, request, single_connection_client=True, flushdb=True, from_url=None, **kwargs ): |