Tests: Perl streaming body and delayed response simple tests.
This commit is contained in:
@@ -200,5 +200,21 @@ class TestUnitPerlApplication(unit.TestUnitApplicationPerl):
|
||||
self.search_in_log(r'\[error\].+IOFake close\(\) called'),
|
||||
'body io fake close')
|
||||
|
||||
def test_perl_delayed_response(self):
|
||||
self.load('delayed_response')
|
||||
|
||||
resp = self.get()
|
||||
|
||||
self.assertEqual(resp['status'], 200, 'status')
|
||||
self.assertEqual(resp['body'], 'Hello World!', 'body')
|
||||
|
||||
def test_perl_streaming_body(self):
|
||||
self.load('streaming_body')
|
||||
|
||||
resp = self.get()
|
||||
|
||||
self.assertEqual(resp['status'], 200, 'status')
|
||||
self.assertEqual(resp['body'], 'Hello World!', 'body')
|
||||
|
||||
if __name__ == '__main__':
|
||||
TestUnitPerlApplication.main()
|
||||
|
||||
Reference in New Issue
Block a user