summaryrefslogtreecommitdiffhomepage
path: root/test/test_routing.py
diff options
context:
space:
mode:
authorAndrei Belov <defan@nginx.com>2021-02-04 18:40:45 +0300
committerAndrei Belov <defan@nginx.com>2021-02-04 18:40:45 +0300
commit0997fa324ca523ab282f595ac9f44b3e4daff86a (patch)
tree37424fff265780f34f9a9adb7ddd7501a67843f1 /test/test_routing.py
parent2bc99c614d5547e773bda73364efada47f0a37bf (diff)
parent774a6034d9daf32ac6c98da7e4c0ca9e820536b4 (diff)
downloadunit-0997fa324ca523ab282f595ac9f44b3e4daff86a.tar.gz
unit-0997fa324ca523ab282f595ac9f44b3e4daff86a.tar.bz2
Merged with the default branch.
Diffstat (limited to '')
-rw-r--r--test/test_routing.py12
1 files changed, 5 insertions, 7 deletions
diff --git a/test/test_routing.py b/test/test_routing.py
index 83852273..4d27cb61 100644
--- a/test/test_routing.py
+++ b/test/test_routing.py
@@ -1,9 +1,7 @@
# -*- coding: utf-8 -*-
import pytest
-
-from conftest import option
-from conftest import skip_alert
from unit.applications.proto import TestApplicationProto
+from unit.option import option
class TestRouting(TestApplicationProto):
@@ -318,7 +316,7 @@ class TestRouting(TestApplicationProto):
check_pass_error("%1", "%1")
def test_routes_absent(self):
- self.conf(
+ assert 'success' in self.conf(
{
"listeners": {"*:7081": {"pass": "applications/empty"}},
"applications": {
@@ -366,7 +364,7 @@ class TestRouting(TestApplicationProto):
assert self.get()['status'] == 200, 'route match absent'
- def test_routes_route_action_absent(self):
+ def test_routes_route_action_absent(self, skip_alert):
skip_alert(r'failed to apply new conf')
assert 'error' in self.conf(
@@ -755,7 +753,7 @@ class TestRouting(TestApplicationProto):
'routes/main'
), 'route edit configure 9'
- def test_match_edit(self):
+ def test_match_edit(self, skip_alert):
skip_alert(r'failed to apply new conf')
self.route_match({"method": ["GET", "POST"]})
@@ -1352,7 +1350,7 @@ class TestRouting(TestApplicationProto):
assert self.get(url='/?var2=val2')['status'] == 404, 'arr 7'
assert self.get(url='/?var3=foo')['status'] == 200, 'arr 8'
- def test_routes_match_arguments_invalid(self):
+ def test_routes_match_arguments_invalid(self, skip_alert):
# TODO remove it after controller fixed
skip_alert(r'failed to apply new conf')