summaryrefslogtreecommitdiffhomepage
path: root/test/unit/applications/proto.py
diff options
context:
space:
mode:
authorMax Romanov <max.romanov@nginx.com>2020-10-28 00:01:46 +0300
committerMax Romanov <max.romanov@nginx.com>2020-10-28 00:01:46 +0300
commit6a00bab41e2ebffe5f61f6fb9641162624db41d1 (patch)
tree05859e0a76d323a7333bea0ef6086bd07e8f0656 /test/unit/applications/proto.py
parentf007ad4dcfee0037cd86bf31804795e5f60cb2d9 (diff)
downloadunit-6a00bab41e2ebffe5f61f6fb9641162624db41d1.tar.gz
unit-6a00bab41e2ebffe5f61f6fb9641162624db41d1.tar.bz2
Tests: improving get_application_type() and fixing its name.
This patch also enables multiversion tests running for Java.
Diffstat (limited to 'test/unit/applications/proto.py')
-rw-r--r--test/unit/applications/proto.py9
1 files changed, 4 insertions, 5 deletions
diff --git a/test/unit/applications/proto.py b/test/unit/applications/proto.py
index 9a0361d5..6e760c70 100644
--- a/test/unit/applications/proto.py
+++ b/test/unit/applications/proto.py
@@ -7,6 +7,8 @@ from unit.control import TestControl
class TestApplicationProto(TestControl):
+ application_type = None
+
def sec_epoch(self):
return time.mktime(time.gmtime())
@@ -28,15 +30,12 @@ class TestApplicationProto(TestControl):
return found
- def get_appication_type(self):
+ def get_application_type(self):
current_test = (
os.environ.get('PYTEST_CURRENT_TEST').split(':')[-1].split(' ')[0]
)
- if current_test in option.generated_tests:
- return option.generated_tests[current_test]
-
- return None
+ return option.generated_tests.get(current_test, self.application_type)
def _load_conf(self, conf, **kwargs):
if 'applications' in conf: