summaryrefslogtreecommitdiff
path: root/test.py
diff options
context:
space:
mode:
Diffstat (limited to 'test.py')
-rwxr-xr-xtest.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/test.py b/test.py
index 13b7fb2..c9bab38 100755
--- a/test.py
+++ b/test.py
@@ -119,12 +119,16 @@ class Result:
@type name: str
@type check: str or (str -> bool)
"""
+ found = False
for key, value in self.headersdata:
if key == name:
+ found = True
if isinstance(check, str):
self.testcase.assertEqual(check, value)
else:
self.testcase.assert_(check(value))
+ if not found:
+ self.testcase.fail("header %s not found" % name)
from wsgitools import applications