From 54837759f36eddb80af22c8d73e103a948221dc7 Mon Sep 17 00:00:00 2001 From: Andrei Zeliankou Date: Mon, 19 Oct 2020 22:25:29 +0100 Subject: Tests: fixed unit.log print. --- test/unit/applications/lang/python.py | 1 - 1 file changed, 1 deletion(-) (limited to 'test/unit/applications/lang/python.py') diff --git a/test/unit/applications/lang/python.py b/test/unit/applications/lang/python.py index 47b95dac..a4a27bb9 100644 --- a/test/unit/applications/lang/python.py +++ b/test/unit/applications/lang/python.py @@ -12,7 +12,6 @@ class TestApplicationPython(TestApplicationProto): load_module = "wsgi" def load(self, script, name=None, module=None, **kwargs): - print() if name is None: name = script -- cgit From 6a00bab41e2ebffe5f61f6fb9641162624db41d1 Mon Sep 17 00:00:00 2001 From: Max Romanov Date: Wed, 28 Oct 2020 00:01:46 +0300 Subject: Tests: improving get_application_type() and fixing its name. This patch also enables multiversion tests running for Java. --- test/unit/applications/lang/python.py | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'test/unit/applications/lang/python.py') diff --git a/test/unit/applications/lang/python.py b/test/unit/applications/lang/python.py index a4a27bb9..374b0f9c 100644 --- a/test/unit/applications/lang/python.py +++ b/test/unit/applications/lang/python.py @@ -34,11 +34,6 @@ class TestApplicationPython(TestApplicationProto): script_path = '/app/python/' + name - appication_type = self.get_appication_type() - - if appication_type is None: - appication_type = self.application_type - self._load_conf( { "listeners": { @@ -46,7 +41,7 @@ class TestApplicationPython(TestApplicationProto): }, "applications": { name: { - "type": appication_type, + "type": self.get_application_type(), "processes": {"spare": 0}, "path": script_path, "working_directory": script_path, -- cgit From a8a9d80f8dcff98a99c74a923a2a37b9e3e177eb Mon Sep 17 00:00:00 2001 From: Max Romanov Date: Tue, 10 Nov 2020 22:27:08 +0300 Subject: Tests: supporting instant app parameters in load(). --- test/unit/applications/lang/python.py | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) (limited to 'test/unit/applications/lang/python.py') diff --git a/test/unit/applications/lang/python.py b/test/unit/applications/lang/python.py index 374b0f9c..20d4f257 100644 --- a/test/unit/applications/lang/python.py +++ b/test/unit/applications/lang/python.py @@ -34,20 +34,24 @@ class TestApplicationPython(TestApplicationProto): script_path = '/app/python/' + name + app = { + "type": self.get_application_type(), + "processes": kwargs.pop('processes', {"spare": 0}), + "path": script_path, + "working_directory": script_path, + "module": module, + } + + for attr in ('callable', 'home', 'limits', 'path', 'threads'): + if attr in kwargs: + app[attr] = kwargs.pop(attr) + self._load_conf( { "listeners": { "*:7080": {"pass": "applications/" + quote(name, '')} }, - "applications": { - name: { - "type": self.get_application_type(), - "processes": {"spare": 0}, - "path": script_path, - "working_directory": script_path, - "module": module, - } - }, + "applications": {name: app}, }, **kwargs ) -- cgit From 5fd2933d2e54a7b5781698a670abf89b1031db44 Mon Sep 17 00:00:00 2001 From: Max Romanov Date: Tue, 10 Nov 2020 22:27:08 +0300 Subject: Python: supporting ASGI legacy protocol. Introducing manual protocol selection for 'universal' apps and frameworks. --- test/unit/applications/lang/python.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'test/unit/applications/lang/python.py') diff --git a/test/unit/applications/lang/python.py b/test/unit/applications/lang/python.py index 20d4f257..792a86fa 100644 --- a/test/unit/applications/lang/python.py +++ b/test/unit/applications/lang/python.py @@ -42,7 +42,8 @@ class TestApplicationPython(TestApplicationProto): "module": module, } - for attr in ('callable', 'home', 'limits', 'path', 'threads'): + for attr in ('callable', 'home', 'limits', 'path', 'protocol', + 'threads'): if attr in kwargs: app[attr] = kwargs.pop(attr) -- cgit