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
40
tests/unittests/command_parse/test_set_parse.py
Normal file
40
tests/unittests/command_parse/test_set_parse.py
Normal file
|
@ -0,0 +1,40 @@
|
|||
def test_sadd(judge_command):
|
||||
judge_command(
|
||||
"SADD foo m1 m2 m3", {"command": "SADD", "key": "foo", "members": "m1 m2 m3"}
|
||||
)
|
||||
judge_command("SADD foo m1", {"command": "SADD", "key": "foo", "members": "m1"})
|
||||
judge_command("SADD foo", None)
|
||||
|
||||
|
||||
def test_sdiffstore(judge_command):
|
||||
judge_command(
|
||||
"SDIFFSTORE foo m1 m2 m3",
|
||||
{"command": "SDIFFSTORE", "destination": "foo", "keys": "m1 m2 m3"},
|
||||
)
|
||||
judge_command(
|
||||
"SDIFFSTORE foo m1",
|
||||
{"command": "SDIFFSTORE", "destination": "foo", "keys": "m1"},
|
||||
)
|
||||
judge_command("SDIFFSTORE foo", None)
|
||||
|
||||
|
||||
def test_is_member(judge_command):
|
||||
judge_command("SISMEMBER foo m1 m2 m3", None)
|
||||
judge_command(
|
||||
"SISMEMBER foo m1", {"command": "SISMEMBER", "key": "foo", "member": "m1"}
|
||||
)
|
||||
judge_command("SISMEMBER foo", None)
|
||||
|
||||
|
||||
def test_smove(judge_command):
|
||||
judge_command(
|
||||
"SMOVE foo bar m2",
|
||||
{"command": "SMOVE", "key": "foo", "newkey": "bar", "member": "m2"},
|
||||
)
|
||||
judge_command("SMOVE foo m1", None)
|
||||
judge_command("SMOVE foo", None)
|
||||
|
||||
|
||||
def test_spop(judge_command):
|
||||
judge_command("SPOP set", {"command": "SPOP", "key": "set"})
|
||||
judge_command("SPOP set 3", {"command": "SPOP", "key": "set", "count": "3"})
|
Loading…
Add table
Add a link
Reference in a new issue