diff --git a/src/corva/cache_adapter.py b/src/corva/cache_adapter.py index 5d112513..eaac71d2 100644 --- a/src/corva/cache_adapter.py +++ b/src/corva/cache_adapter.py @@ -267,8 +267,6 @@ def __init__( self.default_name = hash_name self.client = client - self.client.ping() - @overload def hset( self, diff --git a/tests/unit/state/test_redis_adapter.py b/tests/unit/state/test_redis_adapter.py index 6bf79864..842d6b92 100644 --- a/tests/unit/state/test_redis_adapter.py +++ b/tests/unit/state/test_redis_adapter.py @@ -3,7 +3,6 @@ import fakeredis import pytest from freezegun import freeze_time -from redis import ConnectionError, Redis from corva.cache_adapter import DeprecatedRedisAdapter from corva.configuration import SETTINGS @@ -25,13 +24,6 @@ def test_connect(redis_adapter): assert redis_adapter.client.ping() -def test_init_connect_exc(): - fake_cache_url = 'redis://random:123' - - with pytest.raises(ConnectionError): - DeprecatedRedisAdapter(hash_name='name', client=Redis.from_url(fake_cache_url)) - - @pytest.mark.parametrize('name', (None, NAME)) def test_hset_and_hget(redis_adapter, name): assert redis_adapter.hset(name=name, key=KEY, value=VAL) == 1