MCPcopy Create free account
hub / github.com/anthropics/anthropic-sdk-python / test_nested_dotted

Function test_nested_dotted

tests/test_qs.py:26–35  ·  view source on GitHub ↗
(method: str)

Source from the content-addressed store, hash-verified

24
25@pytest.mark.parametrize("method", ["class", "function"])
26def 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
38def test_nested_brackets() -> None:

Callers

nothing calls this directly

Calls 1

QuerystringClass · 0.90

Tested by

no test coverage detected