summaryrefslogtreecommitdiffhomepage
path: root/test/unit/applications/lang/python.py
diff options
context:
space:
mode:
Diffstat (limited to 'test/unit/applications/lang/python.py')
-rw-r--r--test/unit/applications/lang/python.py24
1 files changed, 24 insertions, 0 deletions
diff --git a/test/unit/applications/lang/python.py b/test/unit/applications/lang/python.py
new file mode 100644
index 00000000..8c2c8707
--- /dev/null
+++ b/test/unit/applications/lang/python.py
@@ -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",
+ }
+ },
+ }
+ )