From 39adb292d54403d17f86f6852e87b0bda1d49946 Mon Sep 17 00:00:00 2001 From: Andrei Zeliankou Date: Mon, 18 Oct 2021 01:10:11 +0100 Subject: Tests: style. --- test/test_python_procman.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'test/test_python_procman.py') diff --git a/test/test_python_procman.py b/test/test_python_procman.py index a95c5680..389d0747 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 @@ -265,7 +264,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' -- cgit From 506ec2b8258cfe03d0d7e3b19eb79d1075a6174c Mon Sep 17 00:00:00 2001 From: Max Romanov Date: Tue, 9 Nov 2021 15:48:44 +0300 Subject: Tests: app prototype related fixes. --- test/test_python_procman.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'test/test_python_procman.py') diff --git a/test/test_python_procman.py b/test/test_python_procman.py index 389d0747..a25b84ec 100644 --- a/test/test_python_procman.py +++ b/test/test_python_procman.py @@ -22,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 -- cgit