diff options
| author | Gael Pasgrimaud <gael@gawel.org> | 2012-12-09 16:26:27 +0100 |
|---|---|---|
| committer | Gael Pasgrimaud <gael@gawel.org> | 2012-12-09 16:26:27 +0100 |
| commit | 53371dd44709e27b54f77f82abc91b93046c3e15 (patch) | |
| tree | df67fcc2ca653baa8fbb006b0d5dc049352698cf /webtest/debugapp.py | |
| parent | cb1bacfcdf68cf02e3f32b992665ea2bb04b474a (diff) | |
| download | webtest-53371dd44709e27b54f77f82abc91b93046c3e15.tar.gz | |
docs refactoring
Diffstat (limited to 'webtest/debugapp.py')
| -rw-r--r-- | webtest/debugapp.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/webtest/debugapp.py b/webtest/debugapp.py index d78233e..dd82507 100644 --- a/webtest/debugapp.py +++ b/webtest/debugapp.py @@ -1,4 +1,4 @@ -from webob import Request, Response +import webob import six @@ -6,9 +6,10 @@ __all__ = ['debug_app'] def debug_app(environ, start_response): - req = Request(environ) + """The WSGI application used for testing""" + req = webob.Request(environ) if req.path_info == '/form.html' and req.method == 'GET': - resp = Response(content_type='text/html') + resp = webob.Response(content_type='text/html') resp.body = six.b('''<html><body> <form action="/form-submit" method="POST"> <input type="text" name="name"> @@ -46,7 +47,7 @@ def debug_app(environ, start_response): header_name = name[len('header-'):] headers.append((header_name, str(value))) - resp = Response() + resp = webob.Response() resp.status = status resp.headers.update(headers) if req.method != 'HEAD': @@ -58,8 +59,7 @@ def debug_app(environ, start_response): def make_debug_app(global_conf): - """ - An application that displays the request environment, and does + """An application that displays the request environment, and does nothing else (useful for debugging and test purposes). """ return debug_app |
