Skip to content

Commit

Permalink
Update test_http_parser.py
Browse files Browse the repository at this point in the history
  • Loading branch information
Dreamsorcerer committed Oct 6, 2023
1 parent 5a03b0f commit 79686be
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions tests/test_http_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -240,14 +240,6 @@ def test_whitespace_before_header(parser) -> None:
parser.feed_data(text)


def test_parse_headers_longline(parser) -> None:
invalid_unicode_byte = b"\xd9"
header_name = b"Test" + invalid_unicode_byte + b"Header" + b"A" * 8192
text = b"GET /test HTTP/1.1\r\n" + header_name + b": test\r\n" + b"\r\n" + b"\r\n"
with pytest.raises((http_exceptions.LineTooLong, http_exceptions.BadHttpMessage)):
parser.feed_data(text)


def test_parse(parser) -> None:
text = b"GET /test HTTP/1.1\r\n\r\n"
messages, upgrade, tail = parser.feed_data(text)
Expand Down

0 comments on commit 79686be

Please sign in to comment.