summaryrefslogtreecommitdiff
path: root/tests/test_commands.py
diff options
context:
space:
mode:
authorItamar Haber <itamar@redislabs.com>2017-11-13 23:06:02 +0200
committerItamar Haber <itamar@redislabs.com>2017-11-13 23:06:02 +0200
commita945e7c2e1de4e48bd3515c6e83f6a8fe3f23543 (patch)
treebd80669152717b446893685fe0e64a61ab6985a3 /tests/test_commands.py
parent5109cb4f6b610e8d5949716a16435afbbf35075a (diff)
downloadredis-py-a945e7c2e1de4e48bd3515c6e83f6a8fe3f23543.tar.gz
Fixes a KeyError in empty `options` dict at sort's return
Fixes #924
Diffstat (limited to 'tests/test_commands.py')
-rw-r--r--tests/test_commands.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/test_commands.py b/tests/test_commands.py
index b9b9b66..ab9afd4 100644
--- a/tests/test_commands.py
+++ b/tests/test_commands.py
@@ -1375,6 +1375,11 @@ class TestRedisCommands(object):
assert r.lrange('sorted', 0, 10) == \
[b('vodka'), b('milk'), b('gin'), b('apple juice')]
+ def test_sort_issue_924(self, r):
+ # Tests for issue https://github.com/andymccurdy/redis-py/issues/924
+ r.execute_command('SADD', 'issue#924', 1)
+ r.execute_command('SORT', 'issue#924')
+
def test_cluster_addslots(self, mock_cluster_resp_ok):
assert mock_cluster_resp_ok.cluster('ADDSLOTS', 1) is True