MCPcopy
hub / github.com/django/django / test_app

Method test_app

tests/servers/test_basehttp.py:90–96  ·  view source on GitHub ↗

A WSGI app that just reflects its HTTP environ.

(environ, start_response)

Source from the content-addressed store, hash-verified

88 """
89
90 def test_app(environ, start_response):
91 """A WSGI app that just reflects its HTTP environ."""
92 start_response("200 OK", [])
93 http_environ_items = sorted(
94 "%s:%s" % (k, v) for k, v in environ.items() if k.startswith("HTTP_")
95 )
96 yield (",".join(http_environ_items)).encode()
97
98 rfile = BytesIO()
99 rfile.write(b"GET / HTTP/1.0\r\n")

Callers

nothing calls this directly

Calls 3

itemsMethod · 0.45
encodeMethod · 0.45
joinMethod · 0.45

Tested by

no test coverage detected