diff options
Diffstat (limited to 'testenv')
-rw-r--r-- | testenv/tests/plugins/auth/test_pam.py | 5 |
1 files changed, 3 insertions, 2 deletions
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 |