Commit 17149660 authored by lixiaofang's avatar lixiaofang

add test

parent bba001c2
......@@ -189,15 +189,18 @@ def pictorial_topic(topic_id=-1, offset=0, size=10):
result_dict = ESPerform.get_search_results(es_cli_obj, "pictorial", q, offset, size)
if len(result_dict["hits"]) > 0:
for item in result_dict["hits"]:
# id = item["_source"]["id"]
id = [1,2,3,4,5,6,7]
if id not in pictorial_id_list:
pictorial_id_list.append(id) #
logging.info("get result_dict tag:%s" % result_dict)
logging.info("get pictorial_id_list tag:%s" % pictorial_id_list)
# if len(result_dict["hits"]) > 0:
# for item in result_dict["hits"]:
# # id = item["_source"]["id"]
# id = [1,2,3,4,5,6,7]
# if id not in pictorial_id_list:
# pictorial_id_list.append(id) #
id = [1,2,3,4,5,6,7]
if id not in pictorial_id_list:
pictorial_id_list.append(id) #
logging.info("get result_dict tag:%s" % result_dict)
logging.info("get pictorial_id_list tag:%s" % pictorial_id_list)
pictorial_list = pictorial_id_list if len(pictorial_id_list) < 10 else pictorial_id_list[:10]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment