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

Function app

tests/test_responses.py:27–29  ·  tests/test_responses.py::app
(scope: Scope, receive: Receive, send: Send)

Source from the content-addressed store, hash-verified

25
26def test_text_response(test_client_factory: TestClientFactory) -> None:
27 async def app(scope: Scope, receive: Receive, send: Send) -> None:
28 response = Response(class="st">"hello, world", media_type=class="st">"text/plain")
29 await response(scope, receive, send)
30
31 client = test_client_factory(app)
32 response = client.get(class="st">"/")

Calls 13

set_cookieMethod · 0.95
delete_cookieMethod · 0.95
ResponseClass · 0.90
JSONResponseClass · 0.90
RedirectResponseClass · 0.90
BackgroundTaskClass · 0.90
StreamingResponseClass · 0.90
FileResponseClass · 0.90
RequestClass · 0.90
numbersFunction · 0.85
CustomAsyncIteratorClass · 0.85
CustomAsyncIterableClass · 0.85

Tested by

no test coverage detected