def __init__(self, host, port, uri, auto_handle_connection=True):
        # import only if necessary; some tests may not add this to PYTHONPATH
        from codeCheckerDBAccess import codeCheckerDBAccess
        from codeCheckerDBAccess.constants import MAX_QUERY_SIZE

        self.max_query_size = MAX_QUERY_SIZE
        transport = THttpClient.THttpClient(host, port, uri)
        protocol = TJSONProtocol.TJSONProtocol(transport)
        client = codeCheckerDBAccess.Client(protocol)
        super(CCViewerHelper, self).__init__(transport, client,
                                             auto_handle_connection)
Exemple #2
0
    def __init__(self, host, port, uri, session_token=None):
        self.__host = host
        self.__port = port
        self.transport = THttpClient.THttpClient(self.__host, self.__port, uri)
        self.protocol = TJSONProtocol.TJSONProtocol(self.transport)
        self.client = codeCheckerDBAccess.Client(self.protocol)

        if session_token:
            headers = {'Cookie': session_manager.SESSION_COOKIE_NAME +
                       "=" + session_token}
            self.transport.setCustomHeaders(headers)
    def __init__(self, host, port, uri, auto_handle_connection=True,
                 session_token=None):
        # import only if necessary; some tests may not add this to PYTHONPATH
        from codechecker_lib import session_manager
        from codeCheckerDBAccess import codeCheckerDBAccess
        from codeCheckerDBAccess.constants import MAX_QUERY_SIZE

        self.max_query_size = MAX_QUERY_SIZE
        transport = THttpClient.THttpClient(host, port, uri)
        protocol = TJSONProtocol.TJSONProtocol(transport)
        client = codeCheckerDBAccess.Client(protocol)
        if session_token:
            headers = {'Cookie': session_manager.SESSION_COOKIE_NAME +
                       "=" + session_token}
            transport.setCustomHeaders(headers)
        super(CCViewerHelper, self).__init__(transport,
                                             client, auto_handle_connection)
Exemple #4
0
 def __init__(self, host, port, uri):
     self.transport = THttpClient.THttpClient(host, port, uri)
     self.protocol = TJSONProtocol.TJSONProtocol(self.transport)
     self.client = codeCheckerDBAccess.Client(self.protocol)