MCPcopy
hub / github.com/encode/starlette / app

Function app

tests/test_requests.py:18–22  ·  tests/test_requests.py::app
(scope: Scope, receive: Receive, send: Send)

Source from the content-addressed store, hash-verified

16
17def test_request_url(test_client_factory: TestClientFactory) -> None:
18 async def app(scope: Scope, receive: Receive, send: Send) -> None:
19 request = Request(scope, receive)
20 data = {class="st">"method": request.method, class="st">"url": str(request.url)}
21 response = JSONResponse(data)
22 await response(scope, receive, send)
23
24 client = test_client_factory(app)
25 response = client.get(class="st">"/123?a=abc")

Callers

nothing calls this directly

Calls 14

bodyMethod · 0.95
streamMethod · 0.95
formMethod · 0.95
jsonMethod · 0.95
is_disconnectedMethod · 0.95
set_cookieMethod · 0.95
send_push_promiseMethod · 0.95
RequestClass · 0.90
JSONResponseClass · 0.90
PlainTextResponseClass · 0.90
ResponseClass · 0.90
decodeMethod · 0.80

Tested by

no test coverage detected