summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGael Pasgrimaud <gael@gawel.org>2014-04-17 17:02:02 +0200
committerGael Pasgrimaud <gael@gawel.org>2014-04-17 17:02:02 +0200
commit9fed8a51b904919626511a3b4f5eacf1cbd30970 (patch)
tree2c11293b761685e3548bc11f8f820be094b26499
parent2965c23e4d995c6ca85296a49167fda7457713a9 (diff)
parent2c610051fdcae58e5906ad9aa77b478e0f0951a0 (diff)
downloadwebtest-9fed8a51b904919626511a3b4f5eacf1cbd30970.tar.gz
Merge branch 'master' of https://github.com/dmlayton/webtest
-rw-r--r--webtest/app.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/webtest/app.py b/webtest/app.py
index df22abc..029d63c 100644
--- a/webtest/app.py
+++ b/webtest/app.py
@@ -118,7 +118,7 @@ class TestApp(object):
JSONEncoder = json.JSONEncoder
def __init__(self, app, extra_environ=None, relative_to=None,
- use_unicode=True, cookiejar=None, parser_features=None):
+ use_unicode=True, cookiejar=None, parser_features=None, lint=True):
if 'WEBTEST_TARGET_URL' in os.environ:
app = os.environ['WEBTEST_TARGET_URL']
if isinstance(app, string_types):
@@ -140,6 +140,7 @@ class TestApp(object):
# __file__
app = loadapp(app, relative_to=relative_to)
self.app = app
+ self.lint = lint
self.relative_to = relative_to
if extra_environ is None:
extra_environ = {}
@@ -534,7 +535,7 @@ class TestApp(object):
self.cookiejar.add_cookie_header(utils._RequestCookieAdapter(req))
# verify wsgi compatibility
- app = lint.middleware(self.app)
+ app = lint.middleware(self.app) if self.lint else self.app
## FIXME: should it be an option to not catch exc_info?
res = req.get_response(app, catch_exc_info=True)