From 88649fe7eb53b0a71754d21e8a883e817ca39768 Mon Sep 17 00:00:00 2001 From: Dmitry Dygalo Date: Sun, 26 Apr 2020 13:25:54 +0200 Subject: [PATCH] refactor: Fix `Response.headers` type --- src/schemathesis/models.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/schemathesis/models.py b/src/schemathesis/models.py index f0cab83372..88eb0075c6 100644 --- a/src/schemathesis/models.py +++ b/src/schemathesis/models.py @@ -318,7 +318,7 @@ class Response: status_code: int = attr.ib() # pragma: no mutate message: str = attr.ib() # pragma: no mutate - headers: Dict[str, str] = attr.ib() # pragma: no mutate + headers: Dict[str, List[str]] = attr.ib() # pragma: no mutate body: str = attr.ib() # pragma: no mutate encoding: str = attr.ib() # pragma: no mutate http_version: str = attr.ib() # pragma: no mutate @@ -355,7 +355,7 @@ def from_wsgi(cls, response: WSGIResponse, elapsed: float) -> "Response": elapsed=elapsed, ) - def asdict(self) -> Dict[str, Union[str, Dict[str, str]]]: + def asdict(self) -> Dict[str, Union[str, Dict[str, str], Dict[str, List[str]]]]: return { "status": {"code": str(self.status_code), "message": self.message}, "headers": self.headers,