コード例 #1
0
    def __init__(self, **kwargs):
        super(SearchHubLogicAdapter, self).__init__(**kwargs)

        self.host = kwargs.get("searchhub_host")
        self.port = kwargs.get("searchhub_port")
        self.shub_url = "http://{0}:{1}/api/apollo/query-pipelines/lucidfind-default/collections/lucidfind/select".format(self.host, self.port)
        self.shub_display_url = "http://{0}:{1}/p:%20?{2}" #note the %20 is a hack around how shub handles the projects, eventually we'll pass in filters here
        print "URL: {0}".format(self.shub_url)
        self.closest = ClosestMeaningAdapter()
コード例 #2
0
 def setUp(self):
     self.adapter = ClosestMeaningAdapter()
コード例 #3
0
    def setUp(self):
        self.adapter = ClosestMeaningAdapter()

        # Add a mock storage adapter to the context
        self.adapter.set_context(MockContext())