Commit 09d9d7e5 authored by Vincent Pelletier's avatar Vincent Pelletier Committed by Vincent Pelletier

test.testWSGI: Make "request" return response headers as a dict.

Concatenate potential homonymous headers following specification.
parent 26d99301
...@@ -1353,7 +1353,12 @@ class CaucaseTest(unittest.TestCase): ...@@ -1353,7 +1353,12 @@ class CaucaseTest(unittest.TestCase):
(status, header_list), = start_response_list (status, header_list), = start_response_list
# pylint: enable=unbalanced-tuple-unpacking # pylint: enable=unbalanced-tuple-unpacking
status, reason = status.split(' ', 1) status, reason = status.split(' ', 1)
return int(status), reason, header_list, ''.join(body) header_dict = {}
for key, value in header_list:
if key in header_dict: # pragma: no cover
value = header_dict[key] + ',' + value
header_dict[key] = value
return int(status), reason, header_dict, ''.join(body)
UNAUTHORISED_STATUS = 401 UNAUTHORISED_STATUS = 401
self.assertEqual(request({ self.assertEqual(request({
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment