From a89747e97c2a00503260d72082949be4ba97983f Mon Sep 17 00:00:00 2001 From: Andrey Zelenkov Date: Mon, 26 Feb 2018 19:53:40 +0300 Subject: Tests: more perl tests. --- test/unit.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'test/unit.py') diff --git a/test/unit.py b/test/unit.py index 48b5497d..8e7ba105 100644 --- a/test/unit.py +++ b/test/unit.py @@ -237,7 +237,13 @@ class TestUnitHTTP(TestUnit): headers = {} for line in headers_lines: m = re.search('(.*)\:\s(.*)', line) - headers[m.group(1)] = m.group(2) + + if m.group(1) not in headers: + headers[m.group(1)] = m.group(2) + elif isinstance(headers[m.group(1)], list): + headers[m.group(1)].append(m.group(2)) + else: + headers[m.group(1)] = [headers[m.group(1)], m.group(2)] return { 'status': int(status), -- cgit