summaryrefslogtreecommitdiffhomepage
path: root/test/test_python_application.py
diff options
context:
space:
mode:
authorAndrei Zeliankou <zelenkov@nginx.com>2020-12-08 14:37:33 +0000
committerAndrei Zeliankou <zelenkov@nginx.com>2020-12-08 14:37:33 +0000
commitb2e767819f04153944d525ef8d97d2f3a7a9af74 (patch)
tree29748112e707e1cdd3cb1b556a3f437114e5898a /test/test_python_application.py
parent8f916285639d7f9aac9ef03cace5e4dcbcca70cd (diff)
downloadunit-b2e767819f04153944d525ef8d97d2f3a7a9af74.tar.gz
unit-b2e767819f04153944d525ef8d97d2f3a7a9af74.tar.bz2
Tests: skip_alert() converted to the fixture.
Diffstat (limited to 'test/test_python_application.py')
-rw-r--r--test/test_python_application.py7
1 files changed, 3 insertions, 4 deletions
diff --git a/test/test_python_application.py b/test/test_python_application.py
index b28e8c11..b7cec831 100644
--- a/test/test_python_application.py
+++ b/test/test_python_application.py
@@ -5,7 +5,6 @@ import time
import pytest
-from conftest import skip_alert
from conftest import unit_stop
from unit.applications.lang.python import TestApplicationPython
from unit.option import option
@@ -520,13 +519,13 @@ last line: 987654321
assert self.get()['body'] == 'body\n', 'body io file'
@pytest.mark.skip('not yet')
- def test_python_application_syntax_error(self):
+ def test_python_application_syntax_error(self, skip_alert):
skip_alert(r'Python failed to import module "wsgi"')
self.load('syntax_error')
assert self.get()['status'] == 500, 'syntax error'
- def test_python_application_loading_error(self):
+ def test_python_application_loading_error(self, skip_alert):
skip_alert(r'Python failed to import module "blah"')
self.load('empty', module="blah")
@@ -791,7 +790,7 @@ last line: 987654321
assert obj['UID'] == nobody_uid, 'root uid group=root'
assert obj['GID'] == 0, 'root gid group=root'
- def test_python_application_callable(self):
+ def test_python_application_callable(self, skip_alert):
skip_alert(r'Python failed to get "blah" from module')
self.load('callable')