From 7caffaf56ca94e9c72e985b0707dc73fc5647ec7 Mon Sep 17 00:00:00 2001 From: Javier Sánchez Parra Date: Tue, 23 Feb 2021 11:01:53 +0100 Subject: #915 Fix big request test ogServer now responses with "413 Payload Too Large" when the payload is too large. --- tests/units/test_0014_big_request.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/tests/units/test_0014_big_request.py b/tests/units/test_0014_big_request.py index 2d9d861..f9428b3 100644 --- a/tests/units/test_0014_big_request.py +++ b/tests/units/test_0014_big_request.py @@ -10,10 +10,8 @@ class TestBigRequest(unittest.TestCase): self.data = 'X' * MAX_REQ_SIZE def test_post(self): - with self.assertRaises(requests.exceptions.ConnectionError) as context: - requests.post(self.url, data=self.data) - - self.assertTrue('Connection reset by peer' in str(context.exception)) + returned = requests.post(self.url, data=self.data) + self.assertEqual(returned.status_code, 413) if __name__ == '__main__': unittest.main() -- cgit v1.2.3-18-g5258