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.py13
1 files changed, 10 insertions, 3 deletions
diff --git a/test/unit/applications/lang/python.py b/test/unit/applications/lang/python.py
index dcdd2ffe..75d34722 100644
--- a/test/unit/applications/lang/python.py
+++ b/test/unit/applications/lang/python.py
@@ -3,17 +3,22 @@ import shutil
import pytest
from unit.applications.proto import TestApplicationProto
+from urllib.parse import quote
from conftest import option
class TestApplicationPython(TestApplicationProto):
application_type = "python"
+ load_module = "wsgi"
- def load(self, script, name=None, **kwargs):
+ def load(self, script, name=None, module=None, **kwargs):
print()
if name is None:
name = script
+ if module is None:
+ module = self.load_module
+
if script[0] == '/':
script_path = script
else:
@@ -37,14 +42,16 @@ class TestApplicationPython(TestApplicationProto):
self._load_conf(
{
- "listeners": {"*:7080": {"pass": "applications/" + name}},
+ "listeners": {
+ "*:7080": {"pass": "applications/" + quote(name, '')}
+ },
"applications": {
name: {
"type": appication_type,
"processes": {"spare": 0},
"path": script_path,
"working_directory": script_path,
- "module": "wsgi",
+ "module": module,
}
},
},