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
39
tests/cli_tests/test_string_execute.py
Normal file
39
tests/cli_tests/test_string_execute.py
Normal file
|
@ -0,0 +1,39 @@
|
|||
def test_set(cli):
|
||||
cli.sendline("set foo bar")
|
||||
cli.expect(["OK", "127.0.0.1"])
|
||||
|
||||
cli.sendline("set foo bar nx")
|
||||
cli.expect(["(nil)", "127.0.0.1"])
|
||||
|
||||
cli.sendline("set foo bar xx")
|
||||
cli.expect(["OK", "127.0.0.1"])
|
||||
|
||||
cli.sendline("set foo1 bar xx")
|
||||
cli.expect(["(nil)", "127.0.0.1"])
|
||||
|
||||
|
||||
def test_get(cli):
|
||||
cli.sendline("set foo bar")
|
||||
cli.expect("OK")
|
||||
|
||||
cli.sendline("get foo")
|
||||
cli.expect('"bar"')
|
||||
|
||||
|
||||
def test_delete_string(clean_redis, cli, config):
|
||||
config.warning = True
|
||||
cli.sendline("set foo bar")
|
||||
cli.expect("OK")
|
||||
cli.sendline("del foo")
|
||||
cli.expect("Do you want to proceed")
|
||||
cli.sendline("yes")
|
||||
cli.expect("1")
|
||||
|
||||
cli.sendline("get foo")
|
||||
cli.expect("(nil)")
|
||||
|
||||
|
||||
def test_on_dangerous_commands(cli, config):
|
||||
config.warning = True
|
||||
cli.sendline("keys *")
|
||||
cli.expect("KEYS will hang redis server, use SCAN instead")
|
Loading…
Add table
Add a link
Reference in a new issue