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

Function test_nested_dotted

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

Source from the content-addressed store, hash-verified

35
36@pytest.mark.parametrize("method", ["class", "function"])
37def test_nested_dotted(method: str) -> None:
38 if method == "class":
39 serialise = Querystring(nested_format="dots").stringify
40 else:
41 serialise = partial(stringify, nested_format="dots")
42
43 assert unquote(serialise({"a": {"b": "c"}})) == "a.b=c"
44 assert unquote(serialise({"a": {"b": "c", "d": "e", "f": "g"}})) == "a.b=c&a.d=e&a.f=g"
45 assert unquote(serialise({"a": {"b": {"c": {"d": "e"}}}})) == "a.b.c.d=e"
46 assert unquote(serialise({"a": {"b": True}})) == "a.b=true"
47
48
49def test_nested_brackets() -> None:

Callers

nothing calls this directly

Calls 1

QuerystringClass · 0.90

Tested by

no test coverage detected