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