summaryrefslogtreecommitdiff
path: root/paste/fixture.py
diff options
context:
space:
mode:
authorianb <devnull@localhost>2007-01-24 01:08:32 +0000
committerianb <devnull@localhost>2007-01-24 01:08:32 +0000
commitd0ccb2ac27fa5ea98e329d74ec3ee892efcf5f7e (patch)
treec80d9b95283045ecba083604cb46c55417e1f654 /paste/fixture.py
parent8f7e814a52fc1b195a304c29af7b4e49e76a2b2f (diff)
downloadpaste-d0ccb2ac27fa5ea98e329d74ec3ee892efcf5f7e.tar.gz
Allow list of status in test calls
Diffstat (limited to 'paste/fixture.py')
-rw-r--r--paste/fixture.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/paste/fixture.py b/paste/fixture.py
index 1ecd119..30fe781 100644
--- a/paste/fixture.py
+++ b/paste/fixture.py
@@ -373,6 +373,13 @@ class TestApp(object):
__tracebackhide__ = True
if status == '*':
return
+ if isinstance(status, (list, tuple)):
+ if res.status not in status:
+ raise AppError(
+ "Bad response: %s (not one of %s for %s)\n%s"
+ % (res.full_status, ', '.join(map(str, status)),
+ res.request.url, res.body))
+ return
if status is None:
if res.status == 200 or (
res.status >= 300 and res.status < 400):