Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
nggit committed Dec 12, 2024
1 parent b6dcff4 commit e3698b5
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions tests/test_http.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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):
Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit e3698b5

Please sign in to comment.