Tests: unit module refactoring.
This commit is contained in:
24
test/unit/applications/lang/python.py
Normal file
24
test/unit/applications/lang/python.py
Normal file
@@ -0,0 +1,24 @@
|
||||
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",
|
||||
}
|
||||
},
|
||||
}
|
||||
)
|
||||
Reference in New Issue
Block a user