diff options
Diffstat (limited to 'test/test_ruby_application.py')
-rw-r--r-- | test/test_ruby_application.py | 22 |
1 files changed, 10 insertions, 12 deletions
diff --git a/test/test_ruby_application.py b/test/test_ruby_application.py index ed0200d9..95c75d47 100644 --- a/test/test_ruby_application.py +++ b/test/test_ruby_application.py @@ -44,6 +44,7 @@ class TestRubyApplication(TestApplicationRuby): 'Request-Method': 'POST', 'Request-Uri': '/', 'Http-Host': 'localhost', + 'Script-Name': 'config.ru', 'Server-Protocol': 'HTTP/1.1', 'Custom-Header': 'blah', 'Rack-Version': '13', @@ -172,17 +173,16 @@ class TestRubyApplication(TestApplicationRuby): def test_ruby_application_errors_puts(self): self.load('errors_puts') - self.get() + assert self.get()['status'] == 200 assert ( - self.wait_for_record(r'\[error\].+Error in application') - is not None + self.wait_for_record(r'\[error\].+Error in application') is not None ), 'errors puts' def test_ruby_application_errors_puts_int(self): self.load('errors_puts_int') - self.get() + assert self.get()['status'] == 200 assert ( self.wait_for_record(r'\[error\].+1234567890') is not None @@ -191,11 +191,9 @@ class TestRubyApplication(TestApplicationRuby): def test_ruby_application_errors_write(self): self.load('errors_write') - self.get() - + assert self.get()['status'] == 200 assert ( - self.wait_for_record(r'\[error\].+Error in application') - is not None + self.wait_for_record(r'\[error\].+Error in application') is not None ), 'errors write' def test_ruby_application_errors_write_to_s_custom(self): @@ -206,8 +204,7 @@ class TestRubyApplication(TestApplicationRuby): def test_ruby_application_errors_write_int(self): self.load('errors_write_int') - self.get() - + assert self.get()['status'] == 200 assert ( self.wait_for_record(r'\[error\].+1234567890') is not None ), 'errors write int' @@ -215,7 +212,7 @@ class TestRubyApplication(TestApplicationRuby): def test_ruby_application_at_exit(self): self.load('at_exit') - self.get() + assert self.get()['status'] == 200 assert 'success' in self.conf({"listeners": {}, "applications": {}}) @@ -229,7 +226,8 @@ class TestRubyApplication(TestApplicationRuby): try: locales = ( subprocess.check_output( - ['locale', '-a'], stderr=subprocess.STDOUT, + ['locale', '-a'], + stderr=subprocess.STDOUT, ) .decode() .split('\n') |