diff options
author | Andy McCurdy <andy@andymccurdy.com> | 2018-11-14 20:37:02 -0800 |
---|---|---|
committer | Andy McCurdy <andy@andymccurdy.com> | 2018-11-14 20:37:02 -0800 |
commit | 7435603ac4f097f8f9d187b9b665364666cfee9e (patch) | |
tree | 2282bd430df7f46dd2d16efec716fdf7493c9ccf /tests/test_commands.py | |
parent | 6d6e1a97625839d882f5b9080038e99d1e58e57b (diff) | |
download | redis-py-7435603ac4f097f8f9d187b9b665364666cfee9e.tar.gz |
EXISTS now accepts multiple keys. return the number of existing keys
Fixes #1053
Fixes #635
Fixes #766
Diffstat (limited to 'tests/test_commands.py')
-rw-r--r-- | tests/test_commands.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/tests/test_commands.py b/tests/test_commands.py index c8f259c..e2e3cbb 100644 --- a/tests/test_commands.py +++ b/tests/test_commands.py @@ -352,9 +352,11 @@ class TestRedisCommands(object): assert r['a'] == b'bar' def test_exists(self, r): - assert not r.exists('a') + assert r.exists('a') == 0 r['a'] = 'foo' - assert r.exists('a') + r['b'] = 'bar' + assert r.exists('a') == 1 + assert r.exists('a', 'b') == 2 def test_exists_contains(self, r): assert 'a' not in r |