summaryrefslogtreecommitdiffstats
path: root/tests/cli_tests/test_on_error.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/cli_tests/test_on_error.py')
-rw-r--r--tests/cli_tests/test_on_error.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/cli_tests/test_on_error.py b/tests/cli_tests/test_on_error.py
new file mode 100644
index 0000000..9ab8927
--- /dev/null
+++ b/tests/cli_tests/test_on_error.py
@@ -0,0 +1,12 @@
+def test_wrong_stream_type(clean_redis, cli):
+ clean_redis.lpush("mylist", "foo")
+ cli.sendline("xrange mylist 0 -1")
+ cli.expect("error")
+ cli.expect("Invalid stream ID specified as stream command argument")
+
+
+def test_wrong_stream_type_in_raw_mode(clean_redis, raw_cli):
+ clean_redis.lpush("mylist", "foo")
+ raw_cli.sendline("xrange mylist 0 -1")
+ raw_cli.expect("ERROR")
+ raw_cli.expect("Invalid stream ID specified as stream command argument")