From 0bfa09dfa0ec6a1474ba30d0e1f8aea832fbc1fc Mon Sep 17 00:00:00 2001 From: Andrei Zeliankou Date: Tue, 14 Apr 2020 02:35:04 +0100 Subject: Tests: minor fixes and style. --- test/test_perl_application.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'test/test_perl_application.py') diff --git a/test/test_perl_application.py b/test/test_perl_application.py index a4bac623..cc4eb915 100644 --- a/test/test_perl_application.py +++ b/test/test_perl_application.py @@ -197,6 +197,7 @@ class TestPerlApplication(TestApplicationPerl): self.assertEqual(self.get()['status'], 200, 'init') + body = '0123456789' * 500 (resp, sock) = self.post( headers={ 'Host': 'localhost', @@ -204,12 +205,13 @@ class TestPerlApplication(TestApplicationPerl): 'Content-Type': 'text/html', }, start=True, - body='0123456789' * 500, + body=body, read_timeout=1, ) - self.assertEqual(resp['body'], '0123456789' * 500, 'keep-alive 1') + self.assertEqual(resp['body'], body, 'keep-alive 1') + body = '0123456789' resp = self.post( headers={ 'Host': 'localhost', @@ -217,10 +219,10 @@ class TestPerlApplication(TestApplicationPerl): 'Content-Type': 'text/html', }, sock=sock, - body='0123456789', + body=body, ) - self.assertEqual(resp['body'], '0123456789', 'keep-alive 2') + self.assertEqual(resp['body'], body, 'keep-alive 2') def test_perl_body_io_fake(self): self.load('body_io_fake') -- cgit