def test_client_nologin(self, connstr): c = CLI() c.loadplugins() with pytest.raises(Exception) as exc: c = omero.client(connstr) c.createSession('root', 'omero') assert issubclass(exc.type, ( Ice.ConnectionRefusedException, Ice.ConnectionLostException, Ice.ProtocolException, ))