From eb13da03be9f52954755930def2bfdf57fb6347c Mon Sep 17 00:00:00 2001 From: Devaev Maxim Date: Fri, 29 May 2020 04:16:20 +0300 Subject: refactoring --- testenv/tests/plugins/auth/test_pam.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'testenv/tests/plugins/auth/test_pam.py') diff --git a/testenv/tests/plugins/auth/test_pam.py b/testenv/tests/plugins/auth/test_pam.py index 5e69f305..e3e7fc99 100644 --- a/testenv/tests/plugins/auth/test_pam.py +++ b/testenv/tests/plugins/auth/test_pam.py @@ -21,7 +21,6 @@ import asyncio -import signal import pwd from typing import Dict @@ -30,6 +29,8 @@ from typing import Optional import pytest +from kvmd import aioproc + from . import get_configured_auth_service @@ -44,7 +45,7 @@ async def _run_process(cmd: str, input: Optional[str]=None) -> None: # pylint: proc = await asyncio.create_subprocess_exec( *cmd.split(" "), stdin=(asyncio.subprocess.PIPE if input is not None else None), - preexec_fn=(lambda: signal.signal(signal.SIGINT, signal.SIG_IGN)), + preexec_fn=aioproc.preexec_ignore_sigint, ) await proc.communicate(input.encode() if input is not None else None) assert proc.returncode == 0 -- cgit v1.2.3