Exemple #1
0
def test_suggest():
    client = Client(app_key, app_secret, base_url)
    suggest = Suggest(client, index_name)
    ret = yield from suggest.call('open', 'test_suggest', hit=10)
    print(ret)
    client.session.close()
    assert len(ret['suggestions']) > 0
def test_suggest():
    '''
        must had set suggest rule name "test_suggest"
    '''
    client = Client(app_key, app_secret, base_url, lib=client_name)
    suggest = Suggest(client, index_name)
    ret = suggest.call('open', 'test_suggest', hit=10)
    print(ret)
    assert len(ret['suggestions']) >= 0
def test_suggest():
    '''
        must had set suggest rule name "test_suggest"
    '''
    client = Client(app_key, app_secret, base_url, lib=client_name)
    suggest = Suggest(client, index_name)
    ret = suggest.call('open', 'test_suggest', hit=10)
    print(ret)
    assert len(ret['suggestions']) >= 0
def test_suggest():
    """
        must had set suggest rule name "test_suggest"
    """
    client = Client(app_key, app_secret, base_url, lib=client_name)
    suggest = Suggest(client, index_name)
    ret = suggest.call("open", "test_suggest", hit=10)
    print(ret)
    assert len(ret["suggestions"]) >= 0