diff --git a/bitelab/mocks.py b/bitelab/mocks.py index f54d3b6..2d897b9 100644 --- a/bitelab/mocks.py +++ b/bitelab/mocks.py @@ -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