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

Function application

tests/test_app.py:607–618  ·  view source on GitHub ↗
(environ, start_response)

Source from the content-addressed store, hash-verified

605
606
607def application(environ, start_response):
608 req = Request(environ)
609 if req.path_info == '/redirect':
610 req.path_info = '/path'
611 resp = Response()
612 resp.status = '302 Found'
613 resp.location = req.path
614 else:
615 resp = Response()
616 resp.body = to_bytes(
617 '<html><body><a href="%s">link</a></body></html>' % req.path)
618 return resp(environ, start_response)
619
620
621class TestScriptName(unittest.TestCase):

Callers 1

lint_appFunction · 0.50

Calls 1

to_bytesFunction · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…