File: test_on_error.py

package info (click to toggle)
iredis 1.15.2-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 3,244 kB
  • sloc: python: 7,196; sh: 16; makefile: 14
file content (12 lines) | stat: -rw-r--r-- 472 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
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")