summaryrefslogtreecommitdiffhomepage
path: root/test/test_python_procman.py
diff options
context:
space:
mode:
authorAndrei Belov <defan@nginx.com>2021-11-18 17:04:04 +0300
committerAndrei Belov <defan@nginx.com>2021-11-18 17:04:04 +0300
commitb400ccd1aa8eeb6a5de1707e0bb8c3d417fe69b7 (patch)
tree60ff49ffc16ef7cb3aad1beb2d78f051a8794cdf /test/test_python_procman.py
parentfafd44166d9e835e91a4c5668048308ce99a62bd (diff)
parentb77895d1c7d6cd4826ac7427c91baa95b998a912 (diff)
downloadunit-b400ccd1aa8eeb6a5de1707e0bb8c3d417fe69b7.tar.gz
unit-b400ccd1aa8eeb6a5de1707e0bb8c3d417fe69b7.tar.bz2
Merged with the default branch.1.26.0-1
Diffstat (limited to 'test/test_python_procman.py')
-rw-r--r--test/test_python_procman.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/test/test_python_procman.py b/test/test_python_procman.py
index a95c5680..a25b84ec 100644
--- a/test/test_python_procman.py
+++ b/test/test_python_procman.py
@@ -4,7 +4,6 @@ import subprocess
import time
import pytest
-
from unit.applications.lang.python import TestApplicationPython
from unit.option import option
@@ -23,7 +22,9 @@ class TestPythonProcman(TestApplicationPython):
output = subprocess.check_output(['ps', 'ax'])
pids = set()
- for m in re.findall('.*' + self.app_name, output.decode()):
+ for m in re.findall(
+ '.*unit: "' + self.app_name + '" application', output.decode()
+ ):
pids.add(re.search(r'^\s*(\d+)', m).group(1))
return pids
@@ -265,7 +266,8 @@ class TestPythonProcman(TestApplicationPython):
assert len(self.pids_for_process()) == 1, 'longstarts == 1'
- pid = self.get()['body']
+ self.get()
+
pids = self.pids_for_process()
assert len(pids) == 2, 'longstarts == 2'