summaryrefslogtreecommitdiffhomepage
path: root/test/test_ruby_application.py
diff options
context:
space:
mode:
authorKonstantin Pavlov <thresh@nginx.com>2022-06-02 16:51:49 +0400
committerKonstantin Pavlov <thresh@nginx.com>2022-06-02 16:51:49 +0400
commitd9fddee1dbfc1f5d49c8f40386289d7188030952 (patch)
tree842a62b343ac33eba10e7a426a10b55bb1c46aed /test/test_ruby_application.py
parent420395ee2e7cd464e157c49bea3d74f15bf25f30 (diff)
parent0d48fe73c4450901622373e35f6ff3a944ec13d6 (diff)
downloadunit-1.27.0-1.tar.gz
unit-1.27.0-1.tar.bz2
Merged with the default branch.1.27.0-1
Diffstat (limited to '')
-rw-r--r--test/test_ruby_application.py22
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')