From 07789a23e9c513dba87b020fae2989a57955e8a6 Mon Sep 17 00:00:00 2001 From: Andrei Zeliankou Date: Sun, 6 Dec 2020 16:01:59 +0000 Subject: Tests: options moved to the separate class. This change is necessary to separate the logic and prevent possible circular dependency. --- test/test_routing.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'test/test_routing.py') diff --git a/test/test_routing.py b/test/test_routing.py index 83852273..a49075ae 100644 --- a/test/test_routing.py +++ b/test/test_routing.py @@ -1,9 +1,9 @@ # -*- 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): -- cgit From b2e767819f04153944d525ef8d97d2f3a7a9af74 Mon Sep 17 00:00:00 2001 From: Andrei Zeliankou Date: Tue, 8 Dec 2020 14:37:33 +0000 Subject: Tests: skip_alert() converted to the fixture. --- test/test_routing.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'test/test_routing.py') diff --git a/test/test_routing.py b/test/test_routing.py index a49075ae..30f25a9c 100644 --- a/test/test_routing.py +++ b/test/test_routing.py @@ -1,7 +1,6 @@ # -*- coding: utf-8 -*- import pytest -from conftest import skip_alert from unit.applications.proto import TestApplicationProto from unit.option import option @@ -366,7 +365,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 +754,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 +1351,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') -- cgit From 6dc9c47ccd26b23b61b7522803a667c2e515e260 Mon Sep 17 00:00:00 2001 From: Andrei Zeliankou Date: Wed, 13 Jan 2021 06:22:43 +0000 Subject: Tests: style. --- test/test_routing.py | 1 - 1 file changed, 1 deletion(-) (limited to 'test/test_routing.py') diff --git a/test/test_routing.py b/test/test_routing.py index 30f25a9c..21c1899e 100644 --- a/test/test_routing.py +++ b/test/test_routing.py @@ -1,6 +1,5 @@ # -*- coding: utf-8 -*- import pytest - from unit.applications.proto import TestApplicationProto from unit.option import option -- cgit From d43a84139d1adedbae8def67c8bbee09d8cf4581 Mon Sep 17 00:00:00 2001 From: Andrei Zeliankou Date: Thu, 14 Jan 2021 03:04:20 +0000 Subject: Tests: added missing checks for configuration results. --- test/test_routing.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'test/test_routing.py') diff --git a/test/test_routing.py b/test/test_routing.py index 21c1899e..4d27cb61 100644 --- a/test/test_routing.py +++ b/test/test_routing.py @@ -316,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": { -- cgit