MCPcopy Create free account
hub / github.com/Pylons/webtest / application

Function application

tests/test_lint.py:25–39  ·  view source on GitHub ↗
(environ, start_response)

Source from the content-addressed store, hash-verified

23
24
25def application(environ, start_response):
26 req = Request(environ)
27 resp = Response()
28 env_input = environ['wsgi.input']
29 len_body = len(req.body)
30 env_input.input.seek(0)
31 if req.path_info == '/read':
32 resp.body = env_input.read(len_body)
33 elif req.path_info == '/read_line':
34 resp.body = env_input.readline(len_body)
35 elif req.path_info == '/read_lines':
36 resp.body = b'-'.join(env_input.readlines(len_body))
37 elif req.path_info == '/close':
38 resp.body = env_input.close()
39 return resp(environ, start_response)
40
41
42class TestLatin1Assertion(unittest.TestCase):

Callers

nothing calls this directly

Calls 5

seekMethod · 0.80
readMethod · 0.80
readlineMethod · 0.80
readlinesMethod · 0.80
closeMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…