# Path: performanceplatform/utils/requests_with_backoff.py
# _MAX_RETRIES = 5
# def get(url, *args, **kwargs):
# def post(url, *args, **kwargs):
# def __request_with_backoff(method, url, *args, **kwargs):


from mock import patch, call
from nose.tools import assert_equal, assert_raises, assert_is
from performanceplatform.utils import requests_with_backoff
import requests


def _make_good_response():
    good_response = requests.Response()
    good_response.status_code = 200
    good_response._content = str('Hello')
    return good_response


def _make_bad_response(bad_status_code):
    bad_response = requests.Response()
    bad_response.status_code = bad_status_code
    return bad_response


@patch('time.sleep')

# Path: performanceplatform/utils/requests_with_backoff.py
# _MAX_RETRIES = 5
# def get(url, *args, **kwargs):
# def post(url, *args, **kwargs):
# def __request_with_backoff(method, url, *args, **kwargs):


# Path: tests/performanceplatform/utils/test_requests_with_backoff.py
from mock import patch, call
from nose.tools import assert_equal, assert_raises, assert_is
from performanceplatform.utils import requests_with_backoff
import requests



def _make_good_response():
    good_response = requests.Response()
    good_response.status_code = 200
    good_response._content = str('Hello')
    return good_response


def _make_bad_response(bad_status_code):
    bad_response = requests.Response()
    bad_response.status_code = bad_status_code
    return bad_response


@patch('time.sleep')

@patch('performanceplatform.utils.requests_with_backoff.request')