From a1f91223170ab5b36ea40b3746271102291ee7cb Mon Sep 17 00:00:00 2001 From: Vangelis Banos Date: Tue, 14 May 2019 16:29:52 +0000 Subject: [PATCH] Fix test_brozzling::httpd fixture We used `self.headers.getheader` which no longer works. We replace it with `self.headers.get`. We change the code to write binary data to `self.wfile` because we get an exception for writing str and/or None. --- tests/test_brozzling.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/test_brozzling.py b/tests/test_brozzling.py index 0efe5a3..c648f27 100644 --- a/tests/test_brozzling.py +++ b/tests/test_brozzling.py @@ -67,8 +67,8 @@ def httpd(request): self.send_header('WWW-Authenticate', 'Basic realm=\"Test\"') self.send_header('Content-type', 'text/html') self.end_headers() - self.wfile.write(self.headers.getheader('Authorization')) - self.wfile.write('not authenticated') + self.wfile.write(self.headers.get('Authorization', b'')) + self.wfile.write(b'not authenticated') else: super().do_GET()