Tests: added Perl test with many responses using streaming body.

This commit is contained in:
Andrei Zeliankou 2023-03-14 11:06:09 +00:00
parent fa81d7a11a
commit 28bdeec614
2 changed files with 16 additions and 0 deletions

View file

@ -0,0 +1,11 @@
my $counter = 2;
my $app = sub {
my $env = shift;
return sub {
my $responder = shift;
$responder->([200, ['Content-Type'=>'text/plain'], [$counter++]]);
$responder->([200, ['Content-Type'=>'text/plain'], [$counter++]]);
};
};

View file

@ -179,6 +179,11 @@ class TestPerlApplication(TestApplicationPerl):
assert self.get()['body'] == 'body\n', 'body io file'
def test_perl_streaming_body_multiple_responses(self):
self.load('streaming_body_multiple_responses')
assert self.get()['status'] == 200
@pytest.mark.skip('not yet')
def test_perl_application_syntax_error(self, skip_alert):
skip_alert(r'PSGI: Failed to parse script')