Function
application
(environ, start_response)
Source from the content-addressed store, hash-verified
| 605 | |
| 606 | |
| 607 | def 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 | |
| 621 | class TestScriptName(unittest.TestCase): |
Tested by
no test coverage detected
Used in the wild real call sites across dependent graphs
searching dependent graphs…