diff options
author | AleksMat <matej.aleksandrov@sinergise.com> | 2020-05-09 20:37:24 +0200 |
---|---|---|
committer | Andy McCurdy <andy@andymccurdy.com> | 2020-05-09 13:58:28 -0700 |
commit | a7559fee257ad85aaaefad84d3566ef9bdda8a02 (patch) | |
tree | 78a71f6ee7215cc19056fd562d58c3e44d88c168 /tests/test_commands.py | |
parent | 252c840ea2ade01637b4ed7c834dd83b130041b4 (diff) | |
download | redis-py-a7559fee257ad85aaaefad84d3566ef9bdda8a02.tar.gz |
Fix for HSET argument validation to allow any non-None key
Fixes #1337
Fixes #1341
Diffstat (limited to 'tests/test_commands.py')
-rw-r--r-- | tests/test_commands.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/test_commands.py b/tests/test_commands.py index 5c29dd5..65e877c 100644 --- a/tests/test_commands.py +++ b/tests/test_commands.py @@ -1612,6 +1612,10 @@ class TestRedisCommands(object): # key inside of hash that doesn't exist returns null value assert r.hget('a', 'b') is None + # keys with bool(key) == False + assert r.hset('a', 0, 10) == 1 + assert r.hset('a', '', 10) == 1 + def test_hset_with_multi_key_values(self, r): r.hset('a', mapping={'1': 1, '2': 2, '3': 3}) assert r.hget('a', '1') == b'1' |