Skip to content

Commit 8475d2b

Browse files
Send JSON Content-Type in max-request-size tests
Without it Tornado treats the 2MB body as form-urlencoded and newer Python parse_qsl rejects it with 400 before TabPy's 413 check runs.
1 parent e6abe4e commit 8475d2b

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

‎tests/unit/server_tests/test_evaluation_plane_handler.py‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -497,7 +497,8 @@ def test_evaluation_payload_exceeds_max_request_size(self):
497497
response = self.fetch(
498498
"/evaluate",
499499
method="POST",
500-
body=self.create_large_payload()
500+
body=self.create_large_payload(),
501+
headers={"Content-Type": "application/json"},
501502
)
502503
self.assertEqual(413, response.code)
503504

@@ -506,7 +507,8 @@ def test_evaluation_max_request_size_not_applied(self):
506507
response = self.fetch(
507508
"/evaluate",
508509
method="POST",
509-
body=self.create_large_payload()
510+
body=self.create_large_payload(),
511+
headers={"Content-Type": "application/json"},
510512
)
511513
self.assertEqual(200, response.code)
512514
self.assertEqual(1, json.loads(response.body)[0])

0 commit comments

Comments
 (0)