def __init__(self, **kwargs): self._adapter = adapter.Adapter() self._real_http = kwargs.pop('real_http', False) self._real_send = None if kwargs: raise TypeError('Unexpected Arguments: %s' % ', '.join(kwargs))
def __init__(self, **kwargs): case_sensitive = kwargs.pop('case_sensitive', self.case_sensitive) self._adapter = adapter.Adapter(case_sensitive=case_sensitive) self._real_http = kwargs.pop('real_http', False) self._last_send = None if kwargs: raise TypeError('Unexpected Arguments: %s' % ', '.join(kwargs))
def __init__(self, session=None, **kwargs): if session and not isinstance(session, requests.Session): raise TypeError("Only a requests.Session object can be mocked") self._mock_target = session or requests.Session self.case_sensitive = kwargs.pop('case_sensitive', self.case_sensitive) self._adapter = (kwargs.pop('adapter', None) or adapter.Adapter(case_sensitive=self.case_sensitive)) self.real_http = kwargs.pop('real_http', False) self._last_send = None if kwargs: raise TypeError('Unexpected Arguments: %s' % ', '.join(kwargs))