MCPcopy Create free account
hub / github.com/pallets/quart / test_http_path_from_absolute_target

Function test_http_path_from_absolute_target

tests/test_asgi.py:163–183  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

161
162
163def test_http_path_from_absolute_target() -> None:
164 app = Quart(__name__)
165 scope: HTTPScope = {
166 "type": "http",
167 "asgi": {},
168 "http_version": "1.1",
169 "method": "GET",
170 "scheme": "https",
171 "path": "http://quart/path",
172 "raw_path": b"/",
173 "query_string": b"",
174 "root_path": "",
175 "headers": [(b"host", b"quart")],
176 "client": ("127.0.0.1", 80),
177 "server": None,
178 "extensions": {},
179 "state": {}, # type: ignore[typeddict-item]
180 }
181 connection = ASGIHTTPConnection(app, scope)
182 request = connection._create_request_from_scope(lambda: None) # type: ignore
183 assert request.path == "/path"
184
185
186@pytest.mark.parametrize(

Callers

nothing calls this directly

Calls 3

QuartClass · 0.90
ASGIHTTPConnectionClass · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…