예제 #1
0
def mock_google_error(status):
    mock_resp = mock.Mock(spec=Response)
    mock_resp.status = status
    return google_errors.HttpError(mock_resp, b'')
예제 #2
0
def _http_exception(status_code):
    mock_resp = mock.Mock()
    mock_resp.status = status_code

    return google_errors.HttpError(mock_resp, b'')