diff options
author | Max Romanov <max.romanov@nginx.com> | 2020-11-10 22:27:08 +0300 |
---|---|---|
committer | Max Romanov <max.romanov@nginx.com> | 2020-11-10 22:27:08 +0300 |
commit | a8a9d80f8dcff98a99c74a923a2a37b9e3e177eb (patch) | |
tree | 64cfd967bc30176255a25db2c1f91419ec940109 /test/unit/applications/lang | |
parent | b2771702fb6b9c7641b27f4fa1d68b9992dd5b28 (diff) | |
download | unit-a8a9d80f8dcff98a99c74a923a2a37b9e3e177eb.tar.gz unit-a8a9d80f8dcff98a99c74a923a2a37b9e3e177eb.tar.bz2 |
Tests: supporting instant app parameters in load().
Diffstat (limited to 'test/unit/applications/lang')
-rw-r--r-- | test/unit/applications/lang/python.py | 22 |
1 files changed, 13 insertions, 9 deletions
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 ) |