(method: str)
| 24 | |
| 25 | @pytest.mark.parametrize("method", ["class", "function"]) |
| 26 | def test_nested_dotted(method: str) -> None: |
| 27 | if method == "class": |
| 28 | serialise = Querystring(nested_format="dots").stringify |
| 29 | else: |
| 30 | serialise = partial(stringify, nested_format="dots") |
| 31 | |
| 32 | assert unquote(serialise({"a": {"b": "c"}})) == "a.b=c" |
| 33 | assert unquote(serialise({"a": {"b": "c", "d": "e", "f": "g"}})) == "a.b=c&a.d=e&a.f=g" |
| 34 | assert unquote(serialise({"a": {"b": {"c": {"d": "e"}}}})) == "a.b.c.d=e" |
| 35 | assert unquote(serialise({"a": {"b": True}})) == "a.b=true" |
| 36 | |
| 37 | |
| 38 | def test_nested_brackets() -> None: |
nothing calls this directly
no test coverage detected