Test for another error condition

pull/84/head
Simon Willison 2023-04-30 14:33:02 -07:00
rodzic e20c45f6d0
commit ae3dd24b1d
1 zmienionych plików z 5 dodań i 0 usunięć

Wyświetl plik

@ -1218,6 +1218,11 @@ def test_put_objects(moto_s3, args, expected, expected_output):
"args,expected,expected_error",
(
([], None, "Error: Specify one or more keys or use --prefix"),
(
["one.txt", "--prefix", "directory/"],
None,
"Cannot pass both keys and --prefix",
),
(["one.txt"], ["directory/two.txt", "directory/three.json"], None),
(["one.txt", "directory/two.txt"], ["directory/three.json"], None),
(["--prefix", "directory/"], ["one.txt"], None),