Tests: added Perl test with many responses using streaming body.
This commit is contained in:
parent
fa81d7a11a
commit
28bdeec614
2 changed files with 16 additions and 0 deletions
11
test/perl/streaming_body_multiple_responses/psgi.pl
Normal file
11
test/perl/streaming_body_multiple_responses/psgi.pl
Normal 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++]]);
|
||||
};
|
||||
};
|
|
@ -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')
|
||||
|
|
Loading…
Reference in a new issue