test_respawn.py (1635:97afbb6c5a15) test_respawn.py (1654:fc7d0578e124)
1import re
2import subprocess
3import time
4
1import re
2import subprocess
3import time
4
5from conftest import option
5from conftest import skip_alert
6from unit.applications.lang.python import TestApplicationPython
7
8
9class TestRespawn(TestApplicationPython):
10 prerequisites = {'modules': {'python': 'any'}}
11
12 PATTERN_ROUTER = 'unit: router'
13 PATTERN_CONTROLLER = 'unit: controller'
14
15 def setup_method(self):
6from conftest import skip_alert
7from unit.applications.lang.python import TestApplicationPython
8
9
10class TestRespawn(TestApplicationPython):
11 prerequisites = {'modules': {'python': 'any'}}
12
13 PATTERN_ROUTER = 'unit: router'
14 PATTERN_CONTROLLER = 'unit: controller'
15
16 def setup_method(self):
16 super().setup_method()
17 self.app_name = "app-" + option.temp_dir.split('/')[-1]
17
18
18 self.app_name = "app-" + self.temp_dir.split('/')[-1]
19
20 self.load('empty', self.app_name)
21
22 assert 'success' in self.conf(
23 '1', 'applications/' + self.app_name + '/processes'
24 )
25
26 def pid_by_name(self, name):
27 output = subprocess.check_output(['ps', 'ax']).decode()

--- 63 unchanged lines hidden ---
19 self.load('empty', self.app_name)
20
21 assert 'success' in self.conf(
22 '1', 'applications/' + self.app_name + '/processes'
23 )
24
25 def pid_by_name(self, name):
26 output = subprocess.check_output(['ps', 'ax']).decode()

--- 63 unchanged lines hidden ---