diff options
author | Devaev Maxim <[email protected]> | 2020-05-29 04:16:20 +0300 |
---|---|---|
committer | Devaev Maxim <[email protected]> | 2020-05-29 04:30:37 +0300 |
commit | eb13da03be9f52954755930def2bfdf57fb6347c (patch) | |
tree | 5d1776e93e036610652fc9c42c1aabb2d84c443b /testenv/tests | |
parent | 1c93f6a562d1c2106d148cebb128397989fb84fd (diff) |
refactoring
Diffstat (limited to 'testenv/tests')
-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 |