summaryrefslogtreecommitdiff
path: root/webtest
diff options
context:
space:
mode:
authorLie Ryan <lie.1296@gmail.com>2014-06-20 22:01:26 +0100
committerLie Ryan <lie.1296@gmail.com>2014-06-20 22:01:26 +0100
commit371f54f6ab65b133112d5cfc0da39eb77963e702 (patch)
tree485eb2a014ff306f0948c5427de15a4f5924ff3a /webtest
parentc30de67b37be996105dda65dd1338c493fb50575 (diff)
downloadwebtest-371f54f6ab65b133112d5cfc0da39eb77963e702.tar.gz
add support for checking custom reason phrase using status parameter
Diffstat (limited to 'webtest')
-rw-r--r--webtest/app.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/webtest/app.py b/webtest/app.py
index d66d871..4be6eda 100644
--- a/webtest/app.py
+++ b/webtest/app.py
@@ -643,6 +643,9 @@ class TestApp(object):
if (isinstance(status, string_types) and '*' in status):
if re.match(fnmatch.translate(status), res_status, re.I):
return
+ if isinstance(status, string_types):
+ if status == res_status:
+ return
if isinstance(status, (list, tuple)):
if res.status_int not in status:
raise AppError(