|
|
@@ -36,6 +36,10 @@ def wrap_subprocess_exec(mockobj, stdout=b'', stderr=b'', retcode=0): |
|
|
|
proc = Mock() |
|
|
|
proc.communicate = AsyncMock() |
|
|
|
proc.communicate.return_value = (stdout, stderr) |
|
|
|
proc.stdout.read = AsyncMock() |
|
|
|
proc.stdout.read.side_effect = [ stdout, b'' ] |
|
|
|
proc.stdin.drain = AsyncMock() |
|
|
|
proc.stdin.wait_closed = AsyncMock() |
|
|
|
proc.wait = AsyncMock() |
|
|
|
proc.wait.return_value = retcode |
|
|
|
proc.returncode = retcode |
|
|
|