Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 86a1e5b

Browse files
committedJan 27, 2025
testing theory
1 parent b29a241 commit 86a1e5b

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed
 

‎tests/unit/state/test_redis_state.py

+15
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,21 @@ def test_delete(redis):
4848
mock_func.assert_called_once_with(keys=['1'], name=None)
4949

5050

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+
5166
def test_exists(redis):
5267
with patch.object(redis.old_cache_repo, 'exists') as mock_func:
5368
redis.exists(*NAMES)

0 commit comments

Comments
 (0)