Adding upstream version 1.9.1.
Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
parent
2bf0435a35
commit
031879240c
356 changed files with 26924 additions and 0 deletions
31
tests/cli_tests/test_cli_pubsub.py
Normal file
31
tests/cli_tests/test_cli_pubsub.py
Normal file
|
@ -0,0 +1,31 @@
|
|||
def test_subscribe(cli, clean_redis):
|
||||
cli.sendline("subscribe foo")
|
||||
cli.expect("subscribe from")
|
||||
cli.expect("foo")
|
||||
cli.expect("1")
|
||||
|
||||
clean_redis.publish("foo", "test message")
|
||||
cli.expect("from")
|
||||
cli.expect("foo")
|
||||
cli.expect("test message")
|
||||
|
||||
# unsubscribe, send ctrl-c
|
||||
cli.send(chr(3))
|
||||
cli.expect("unsubscribe from")
|
||||
cli.expect("0")
|
||||
|
||||
|
||||
def test_subscribe_in_raw_mode(raw_cli, clean_redis):
|
||||
raw_cli.sendline("subscribe foo")
|
||||
raw_cli.expect("subscribe\r")
|
||||
raw_cli.expect("foo\r")
|
||||
raw_cli.expect("1\r")
|
||||
|
||||
clean_redis.publish("foo", "test message")
|
||||
raw_cli.expect("message\r")
|
||||
raw_cli.expect("foo\r")
|
||||
raw_cli.expect("test message")
|
||||
|
||||
# unsubscribe, send ctrl-c
|
||||
raw_cli.send(chr(3))
|
||||
raw_cli.expect("0\r")
|
Loading…
Add table
Add a link
Reference in a new issue