MCPcopy Create free account
hub / github.com/encode/starlette / test_url_blank_params

Function test_url_blank_params

tests/test_datastructures.py:383–393  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

381
382
383def test_url_blank_params() -> None:
384 q = QueryParams("a=123&abc&def&b=456")
385 assert "a" in q
386 assert "abc" in q
387 assert "def" in q
388 assert "b" in q
389 val = q.get("abc")
390 assert val is not None
391 assert len(val) == 0
392 assert len(q["a"]) == 3
393 assert list(q.keys()) == ["a", "abc", "def", "b"]
394
395
396def test_queryparams() -> None:

Callers

nothing calls this directly

Calls 3

QueryParamsClass · 0.90
getMethod · 0.45
keysMethod · 0.45

Tested by

no test coverage detected