Skip to content

Failed

OmeroPy.test.integration.gatewaytest.test_connection.TestConnectionMethods.testSecure (from pytest)

Failing for the past 1 build (Since #18 )
Took 50 ms.

Error Message

AttributeError: '_BlitzGateway' object has no attribute 'getSessionId'

Stacktrace

self = <test.integration.gatewaytest.test_connection.TestConnectionMethods object at 0x7fe603641760>
gatewaywrapper = <omero.gateway.pytest_fixtures.GatewayWrapper object at 0x7fe595dce730>

    def testSecure(self, gatewaywrapper):
        gatewaywrapper.loginAsUser()
        client = gatewaywrapper.gateway
        assert not client.isSecure()
>       with BlitzGateway(client_obj=client, secure=True) as conn:

test/integration/gatewaytest/test_connection.py:309: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <omero.gateway._BlitzGateway object at 0x7fe589a96940>, username = None
passwd = None
client_obj = <omero.gateway._BlitzGateway object at 0x7fe5b3cdba60>
group = None, clone = False, try_super = False, host = None, port = None
extra_config = [], secure = True, anonymous = True, useragent = None
userip = None

    def __init__(self, username=None, passwd=None, client_obj=None, group=None,
                 clone=False, try_super=False, host=None, port=None,
                 extra_config=None, secure=False, anonymous=True,
                 useragent=None, userip=None):
        """
        Create the connection wrapper.
        Does not attempt to connect at this stage
        Initialises the omero.client
    
        :param username:    User name.
        :type username:     String
        :param passwd:      Password.
        :type passwd:       String
        :param client_obj:  omero.client
        :param group:       name of group to try to connect to
        :type group:        String
        :param clone:       If True, overwrite anonymous with False
        :type clone:        Boolean
        :param try_super:   Try to log on as super user ('system' group)
        :type try_super:    Boolean
        :param host:        Omero server host.
        :type host:         String
        :param port:        Omero server port.
        :type port:         Integer
        :param extra_config:    Dictionary of extra configuration
        :type extra_config:     Dict
        :param secure:      Initial underlying omero.client connection type
                            (True=SSL/False=insecure)
        :type secure:       Boolean
        :param anonymous:
        :type anonymous:    Boolean
        :param useragent:   Log which python clients use this connection.
                            E.g. 'OMERO.webadmin'
        :param userip:      Log client ip.
        :type useragent:    String
        """
    
        if extra_config is None:
            extra_config = []
        super(_BlitzGateway, self).__init__()
        self.CONFIG = GatewayConfig()
        self.c = client_obj
        if not type(extra_config) in (type(()), type([])):
            extra_config = [extra_config]
        self.extra_config = extra_config
        self.ice_config = [self.ICE_CONFIG]
        self.ice_config.extend(extra_config)
        self.ice_config = [os.path.abspath(str(x)) for x in [_f for _f in self.ice_config if _f]]
    
        self.host = host
        if self.c is not None:
            hc = self.c.getProperty("omero.host")
            if self.host is None:
                self.host = hc
            elif hc != self.host:
                raise Exception("hosts %s and %s do not match" % (hc, self.host))
        self.port = port
        if self.c is not None:
            pc = self.c.getProperty("omero.port")
            if self.port is None:
                self.port = pc
            elif pc != self.port:
                raise Exception("ports %s and %s do not match" % (pc, self.port))
        self.secure = secure
        if self.c is not None:
            self.secure = self.c.isSecure()
        self.useragent = useragent
        self.userip = userip
    
        self._sessionUuid = None
        self._session_cb = None
        self._session = None
        if self.c is not None:
            try:
>               self._sessionUuid = self.c.getSessionId()
E               AttributeError: '_BlitzGateway' object has no attribute 'getSessionId'

../../../../.venv3/lib64/python3.9/site-packages/omero/gateway/__init__.py:1552: AttributeError