(method: str)
| 63 | |
| 64 | @pytest.mark.parametrize("method", ["class", "function"]) |
| 65 | def test_array_brackets(method: str) -> None: |
| 66 | if method == "class": |
| 67 | serialise = Querystring(array_format="brackets").stringify |
| 68 | else: |
| 69 | serialise = partial(stringify, array_format="brackets") |
| 70 | |
| 71 | assert unquote(serialise({"in": ["foo", "bar"]})) == "in[]=foo&in[]=bar" |
| 72 | assert unquote(serialise({"a": {"b": [True, False]}})) == "a[b][]=true&a[b][]=false" |
| 73 | assert unquote(serialise({"a": {"b": [True, False, None, True]}})) == "a[b][]=true&a[b][]=false&a[b][]=true" |
| 74 | |
| 75 | |
| 76 | def test_unknown_array_format() -> None: |
nothing calls this directly
no test coverage detected