diff options
author | Javier Sánchez Parra <jsanchez@soleta.eu> | 2021-02-23 11:01:53 +0100 |
---|---|---|
committer | OpenGnSys Support Team <soporte-og@soleta.eu> | 2021-02-23 11:38:06 +0100 |
commit | 7caffaf56ca94e9c72e985b0707dc73fc5647ec7 (patch) | |
tree | 75f3124160021faa8e30a4644efb6932c525d537 /tests | |
parent | f798e03e18de2c8ca684e08ecec28a9d3d90ce32 (diff) |
#915 Fix big request test
ogServer now responses with "413 Payload Too Large" when the payload is
too large.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/units/test_0014_big_request.py | 6 |
1 files 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() |