We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b29a241 commit 86a1e5bCopy full SHA for 86a1e5b
tests/unit/state/test_redis_state.py
@@ -48,6 +48,21 @@ def test_delete(redis):
48
mock_func.assert_called_once_with(keys=['1'], name=None)
49
50
51
+def test__user_redis_cache__main_methods_works(redis):
52
+ redis.set(key='key1', value='text1')
53
+ redis.set(key='key2', value='text2')
54
+ redis.set(key='key3', value='text3')
55
+
56
+ assert redis.get(key='key1') == 'text1'
57
+ assert redis.get_many(keys=['key2', 'key3']) == {'key2': 'text2', 'key3': 'text3'}
58
59
+ redis.delete(key='key1')
60
+ assert redis.get(key='key1') is None
61
62
+ redis.delete_many(keys=['key2', 'key3'])
63
+ assert redis.get_many(keys=['key2', 'key3']) == {'key2': None, 'key3': None}
64
65
66
def test_exists(redis):
67
with patch.object(redis.old_cache_repo, 'exists') as mock_func:
68
redis.exists(*NAMES)
0 commit comments