Skip to content

Commit

Permalink
httpserver_test: Add ExpectLog to fix CI
Browse files Browse the repository at this point in the history
The github security advisory feature lets you make private PRs but
it apparently doesn't support CI so this log failure wasn't caught
until after the PR was merged.
  • Loading branch information
bdarnell committed Aug 11, 2023
1 parent 217295b commit 7dfe8b5
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions tornado/test/httpserver_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -575,9 +575,10 @@ def test_chunked_request_body_invalid_size(self):
b"\n", b"\r\n"
)
)
start_line, headers, response = self.io_loop.run_sync(
lambda: read_stream_body(self.stream)
)
with ExpectLog(gen_log, ".*invalid chunk size", level=logging.INFO):
start_line, headers, response = self.io_loop.run_sync(
lambda: read_stream_body(self.stream)
)
self.assertEqual(400, start_line.code)

@gen_test
Expand Down

0 comments on commit 7dfe8b5

Please sign in to comment.