|
@@ -37,13 +37,13 @@ class TestHandleConnectionErrors(object):
|
|
|
def test_api_error_version_mismatch(self, mock_logging):
|
|
|
with pytest.raises(errors.ConnectionError):
|
|
|
with handle_connection_errors(mock.Mock(api_version='1.22')):
|
|
|
- raise APIError(None, None, "client is newer than server")
|
|
|
+ raise APIError(None, None, b"client is newer than server")
|
|
|
|
|
|
_, args, _ = mock_logging.error.mock_calls[0]
|
|
|
assert "Docker Engine of version 1.10.0 or greater" in args[0]
|
|
|
|
|
|
def test_api_error_version_other(self, mock_logging):
|
|
|
- msg = "Something broke!"
|
|
|
+ msg = b"Something broke!"
|
|
|
with pytest.raises(errors.ConnectionError):
|
|
|
with handle_connection_errors(mock.Mock(api_version='1.22')):
|
|
|
raise APIError(None, None, msg)
|