mirror of
https://github.com/simonw/datasette.git
synced 2025-12-10 16:51:24 +01:00
Rename RequestParameters to MultiParams, refs #799
This commit is contained in:
parent
0c064c5fe2
commit
0da7f49b24
5 changed files with 36 additions and 16 deletions
|
|
@ -437,3 +437,12 @@ def test_call_with_supported_arguments():
|
|||
|
||||
with pytest.raises(TypeError):
|
||||
utils.call_with_supported_arguments(foo, a=1)
|
||||
|
||||
|
||||
def test_multi_params_list():
|
||||
p1 = utils.MultiParams([["foo", "bar"], ["foo", "baz"]])
|
||||
assert "bar" == p1["foo"]
|
||||
assert ["bar", "baz"] == p1.getlist("foo")
|
||||
# Should raise an error if list isn't pairs
|
||||
with pytest.raises(AssertionError):
|
||||
utils.MultiParams([["foo", "bar"], ["foo", "baz", "bar"]])
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue