Skip to content

Commit f4e0c02

Browse files
Additionl test for missing content-length header
1 parent 744eb04 commit f4e0c02

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

tests/integration/test_max_request_size.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,3 +82,12 @@ def test_payload_exceeds_max_request_size_query(self):
8282
response = requests.post(url, data=self.create_large_payload(), headers=headers)
8383
self.assertEqual(413, response.status_code)
8484

85+
def test_no_content_length_header_present(self):
86+
headers = { "Content-Type": "application/json" }
87+
url = self._get_url() + "/evaluate"
88+
response = requests.post(url, headers=headers)
89+
message = json.loads(response.text)["message"]
90+
# Ensure it gets to processing message stage in EvaluationPlaneHandler.post
91+
self.assertEqual("Error processing script", message)
92+
self.assertEqual(500, response.status_code)
93+

0 commit comments

Comments
 (0)