def __init__(self): """ Constructor. """ Transport.__init__(self) from suds.transport.options import Options self.options = Options() del Options self._contextFactory = None
def __init__(self): """ Constructor. """ Transport.__init__(self) from suds.transport.options import Options self.options = Options() del Options self._httpsPolicy = None
def __init__(self, **kwargs): """ @param kwargs: Keyword arguments. - B{proxy} - An http proxy to be specified on requests. The proxy is defined as {protocol:proxy,} - type: I{dict} - default: {} - B{timeout} - Set the url open timeout (seconds). - type: I{float} - default: 90 """ Transport.__init__(self) Unskin(self.options).update(kwargs) self.cookiejar = CookieJar() self.proxy = {} self.urlopener = None
def test_methods_should_be_abstract(self, monkeypatch, method_name): monkeypatch.delitem(locals(), "e", False) transport = Transport() f = getattr(transport, method_name) e = pytest.raises(Exception, f, "whatever").value assert e.__class__ is Exception assert str(e) == "not-implemented"
def test_methods_should_be_abstract(self, monkeypatch, method_name): monkeypatch.delitem(locals(), "e", False) transport = Transport() f = getattr(transport, method_name) e = pytest.raises(Exception, f, "whatever").value try: assert e.__class__ is Exception assert str(e) == "not-implemented" finally: del e # explicitly break circular reference chain in Python 3
def test_members(self): t = Transport() assert t.options.__class__ is suds.transport.options.Options
def __init__(self, session=None, **kwargs): Transport.__init__(self) Unskin(self.options).update(kwargs) self.session = session or Session() # Suds expects support for local files URIs. self.session.mount('file://', FileAdapter())
def __init__(self, service): Transport.__init__(self) self._service = service
def __init__(self): Transport.__init__(self)