Merging upstream version 1.12.0.
Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
parent
d6445459ac
commit
7865f9a813
20 changed files with 536 additions and 80 deletions
|
@ -177,3 +177,42 @@ def test_restore(judge_command):
|
|||
"value": '"\n\x17\x17\x00\x00\x00\x12\x00\x00\x00\x03\x00\x00\xc0\x01\x00\x04\xc0\x02\x00\x04\xc0\x03\x00\xff\x04\x00u#<\xc0;.\xe9\xdd"', # noqa
|
||||
},
|
||||
)
|
||||
|
||||
|
||||
def test_copy(judge_command):
|
||||
judge_command(
|
||||
"COPY foo bar DB 3 REPLACE",
|
||||
{
|
||||
"command": "COPY",
|
||||
"key": ["foo", "bar"],
|
||||
"db_const": "DB",
|
||||
"index": "3",
|
||||
"replace_const": "REPLACE",
|
||||
},
|
||||
)
|
||||
judge_command(
|
||||
"COPY foo bar REPLACE",
|
||||
{"command": "COPY", "key": ["foo", "bar"], "replace_const": "REPLACE"},
|
||||
)
|
||||
judge_command("COPY foo bar", {"command": "COPY", "key": ["foo", "bar"]})
|
||||
|
||||
|
||||
def test_getex(judge_command):
|
||||
judge_command("GETEX foo", {"command": "GETEX", "key": "foo"})
|
||||
judge_command(
|
||||
"GETEX bar ex 5",
|
||||
{"command": "GETEX", "key": "bar", "expiration": "ex", "millisecond": "5"},
|
||||
)
|
||||
judge_command(
|
||||
"GETEX bar px 5",
|
||||
{"command": "GETEX", "key": "bar", "expiration": "px", "millisecond": "5"},
|
||||
)
|
||||
judge_command(
|
||||
"GETEX bar pxat 5",
|
||||
{"command": "GETEX", "key": "bar", "pxat_const": "pxat", "timestampms": "5"},
|
||||
)
|
||||
judge_command(
|
||||
"GETEX bar exat 5",
|
||||
{"command": "GETEX", "key": "bar", "exat_const": "exat", "timestamp": "5"},
|
||||
)
|
||||
judge_command("GETEX bar ex 5 exat 5", None)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue