@@ -26,7 +26,7 @@ def ignore_exceptions_cache(settings) -> RedisCache:
26
26
settings .CACHES = caches_setting
27
27
settings .DJANGO_REDIS_IGNORE_EXCEPTIONS = True
28
28
settings .DJANGO_REDIS_LOG_IGNORED_EXCEPTIONS = True
29
- return cast (RedisCache , caches ["doesnotexist" ])
29
+ return cast (" RedisCache" , caches ["doesnotexist" ])
30
30
31
31
32
32
def test_get_django_omit_exceptions_many_returns_default_arg (
@@ -58,7 +58,7 @@ def test_get_django_omit_exceptions_priority_1(settings):
58
58
caches_setting ["doesnotexist" ]["OPTIONS" ]["IGNORE_EXCEPTIONS" ] = True
59
59
settings .CACHES = caches_setting
60
60
settings .DJANGO_REDIS_IGNORE_EXCEPTIONS = False
61
- cache = cast (RedisCache , caches ["doesnotexist" ])
61
+ cache = cast (" RedisCache" , caches ["doesnotexist" ])
62
62
assert cache ._ignore_exceptions is True
63
63
assert cache .get ("key" ) is None
64
64
@@ -68,7 +68,7 @@ def test_get_django_omit_exceptions_priority_2(settings):
68
68
caches_setting ["doesnotexist" ]["OPTIONS" ]["IGNORE_EXCEPTIONS" ] = False
69
69
settings .CACHES = caches_setting
70
70
settings .DJANGO_REDIS_IGNORE_EXCEPTIONS = True
71
- cache = cast (RedisCache , caches ["doesnotexist" ])
71
+ cache = cast (" RedisCache" , caches ["doesnotexist" ])
72
72
assert cache ._ignore_exceptions is False
73
73
with pytest .raises (ConnectionError ):
74
74
cache .get ("key" )
@@ -84,7 +84,7 @@ def key_prefix_cache(cache: RedisCache, settings) -> Iterable[RedisCache]:
84
84
85
85
@pytest .fixture
86
86
def with_prefix_cache () -> Iterable [RedisCache ]:
87
- with_prefix = cast (RedisCache , caches ["with_prefix" ])
87
+ with_prefix = cast (" RedisCache" , caches ["with_prefix" ])
88
88
yield with_prefix
89
89
with_prefix .clear ()
90
90
0 commit comments