Files
nginx-unit/test/unit/applications/lang/python.py
2019-03-28 18:43:13 +03:00

25 lines
725 B
Python

from unit.applications.proto import TestApplicationProto
class TestApplicationPython(TestApplicationProto):
def load(self, script, name=None):
if name is None:
name = script
script_path = self.current_dir + '/python/' + script
self.conf(
{
"listeners": {"*:7080": {"application": name}},
"applications": {
name: {
"type": "python",
"processes": {"spare": 0},
"path": script_path,
"working_directory": script_path,
"module": "wsgi",
}
},
}
)