From 39079977ce84bd6ddb946c385aabdb17c093388a Mon Sep 17 00:00:00 2001 From: Bert JW Regeer Date: Thu, 21 Apr 2022 13:42:03 -0600 Subject: [PATCH] Fix tests to assume body is bytes --- tests/test_proxy_headers.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/test_proxy_headers.py b/tests/test_proxy_headers.py index 9ed131ef..45f98785 100644 --- a/tests/test_proxy_headers.py +++ b/tests/test_proxy_headers.py @@ -16,7 +16,7 @@ def start_response(status, response_headers): response.headers = response_headers response.steps = list(app(environ, start_response)) - response.body = b"".join(s.encode("latin-1") for s in response.steps) + response.body = b"".join(s for s in response.steps) return response def test_get_environment_values_w_scheme_override_untrusted(self): @@ -727,7 +727,7 @@ class DummyApp: def __call__(self, environ, start_response): self.environ = environ start_response("200 OK", [("Content-Type", "text/plain")]) - yield "hello" + yield b"hello" class DummyResponse: