Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def test_call_when_raw_response_object_requested(self, mock_response, mock_endpoint):
service = mock.Mock()
service.get_hosts.return_value = ["http://host1.biz"]
service.required_headers = {}
session = mock.Mock()
session.send.return_value = mock_response
response = client.call(
service, mock_endpoint, session=session, logger=mock.Mock(), return_raw_response_object=True
)
assert response is mock_response
def __get__(self, instance, owner):
caller = partial(client.call, owner, self)
update_wrapper(caller, client.call)
return caller
def __get__(self, instance, owner):
caller = partial(client.call, owner, self)
update_wrapper(caller, client.call)
return caller