Merge pull request #4067 from shin-/portable-find-exe

Replace "which" calls with the portable find_executable function
This commit is contained in:
Aanand Prasad 2016-10-24 16:15:21 -07:00 committed by GitHub
commit 8b5782ba9f
3 changed files with 9 additions and 9 deletions

View file

@ -16,9 +16,9 @@ def mock_logging():
yield mock_log
def patch_call_silently(side_effect):
def patch_find_executable(side_effect):
return mock.patch(
'compose.cli.errors.call_silently',
'compose.cli.errors.find_executable',
autospec=True,
side_effect=side_effect)
@ -27,7 +27,7 @@ class TestHandleConnectionErrors(object):
def test_generic_connection_error(self, mock_logging):
with pytest.raises(errors.ConnectionError):
with patch_call_silently([0, 1]):
with patch_find_executable(['/bin/docker', None]):
with handle_connection_errors(mock.Mock()):
raise ConnectionError()