MCPcopy
hub / github.com/encode/httpx / application_factory

Function application_factory

tests/test_wsgi.py:17–30  ·  view source on GitHub ↗
(output: typing.Iterable[bytes])

Source from the content-addressed store, hash-verified

15
16
17def application_factory(output: typing.Iterable[bytes]) -> WSGIApplication:
18 def application(environ, start_response):
19 status = "200 OK"
20
21 response_headers = [
22 ("Content-type", "text/plain"),
23 ]
24
25 start_response(status, response_headers)
26
27 for item in output:
28 yield item
29
30 return wsgiref.validate.validator(application)
31
32
33def echo_body(

Callers 4

test_wsgiFunction · 0.85
test_wsgi_generatorFunction · 0.85
test_wsgi_server_portFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected