Deleted Added
1import os
2import shutil
3import pytest
4
5from unit.applications.proto import TestApplicationProto
6from conftest import option
7
8
9class TestApplicationPython(TestApplicationProto):
10 application_type = "python"
11
12 def load(self, script, name=None, **kwargs):
13 print()
14 if name is None:
15 name = script
16
17 if script[0] == '/':
18 script_path = script
19 else:
20 script_path = option.test_dir + '/python/' + script
21
22 if kwargs.get('isolation') and kwargs['isolation'].get('rootfs'):
23 rootfs = kwargs['isolation']['rootfs']
24

--- 7 unchanged lines hidden (view full) ---

32
33 appication_type = self.get_appication_type()
34
35 if appication_type is None:
36 appication_type = self.application_type
37
38 self._load_conf(
39 {
40 "listeners": {"*:7080": {"pass": "applications/" + name}},
41 "applications": {
42 name: {
43 "type": appication_type,
44 "processes": {"spare": 0},
45 "path": script_path,
46 "working_directory": script_path,
47 "module": "wsgi",
48 }
49 },
50 },
51 **kwargs
52 )