From e3698b5c68e2c86ce383808d3e649bc05e051945 Mon Sep 17 00:00:00 2001 From: nggit <12218311+nggit@users.noreply.github.com> Date: Thu, 12 Dec 2024 18:10:59 +0700 Subject: [PATCH] fix tests --- tests/test_http.py | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/tests/test_http.py b/tests/test_http.py index 88dffbd..d5b5188 100644 --- a/tests/test_http.py +++ b/tests/test_http.py @@ -52,7 +52,8 @@ def test_imports(self): version='1.1') self.assertEqual( - header[:header.find(b'\r\n')], b'HTTP/1.1 201 Created' + header[:header.find(b'\r\n')], + b'HTTP/1.1 201 Created' ) self.assertTrue(b'\r\nFoo: baz' in header) self.assertTrue(b'\r\nSet-Cookie: foo=bar; ' in header) @@ -193,7 +194,8 @@ def test_badrequest(self): ) self.assertEqual( - header[:header.find(b'\r\n')], b'HTTP/1.1 400 Bad Request' + header[:header.find(b'\r\n')], + b'HTTP/1.1 400 Bad Request' ) def test_private_file(self): @@ -268,9 +270,10 @@ def test_sec_unsafe_chars_nul(self): version='1.1') # NUL is already handled by upstream - # currently the response is empty - self.assertEqual(header, b'') - self.assertEqual(body, b'') + self.assertEqual( + header[:header.find(b'\r\n')], + b'HTTP/1.0 400 Bad Request' + ) def test_disallowed_ext(self): header, body = getcontents(host=HTTP_HOST,