@staticmethod
def _mock_requests_response(status_code, headers, content=b''):
    import requests
    response = requests.Response()
    response.status_code = status_code
    response.headers.update(headers)
    response._content = content
    response.request = requests.Request('POST', 'http://example.com').prepare()
    return response
@staticmethod
def _mock_requests_response(status_code, headers, content=b):
    import requests
    response = requests.Response()
    response.status_code = status_code
    response.headers.update(headers)
    response._content = content
    response.request = requests.Request('POST', 'http://example.com').prepare()
    return response