??????????????????????????????y?屣???? ?????y?屣????????????setting-list ???й??????
????????????????????????????

????????case??????????
# -*- coding: GB18030 -*-
from LuasBaseCase import *
from Caseimport import *
class luas_publisher_filter_case_1(LuasBaseCase):
def preEnv(self):
'''''
owner: qixuan02
???????????:
????1.????publisher_settings_list.dat???????????й??????-----????????????
????2.????herry2kate.txt???????????herryid2kateid???????
????3.????kate???????kateid??keyword?????
????4.????wordid??keyword?????????????з?????keyword
????5.???????????????????????
????6.??????????wordid
????7.????luui2as?????е?publisher_settings_list_id??????seller_network_id=8?????????
????8.???????????????????Ч
'''
#set publisher_settings_list
super(self.__class__??self).preEnv()
FileFactory_obj = FileFactory()
publisher_settings_list_fname_obj = FileFactory_obj.getFileInstance('publisher_settings_list_path/publisher_settings_list_fname')
publisher_settings_list_fname_obj.addRawData('494 {"advertiser": null??"keyword": null??"price": null??"vulgar": null??"dsp": null??"creativeType": null??"oldIndustry": [3?? 4?? 2101]??"industry": [5501?? 6901?? 5301?? 53]}')
publisher_settings_list_fname_obj.write()
#set herry2kate dict
lu_herry2kate_fname_obj = FileFactory_obj.getFileInstance('lu_herry2kate_dir/lu_herry2kate_fname')
lu_herry2kate_fname_obj.addRawData('3 34')
lu_herry2kate_fname_obj.addRawData('4 333')
lu_herry2kate_fname_obj.addRawData('2101 34')
lu_herry2kate_fname_obj.write()
#set wordid dict
kt_dict_conf_fname_obj = FileFactory_obj.getFileInstance('kt_dict_conf_dir/kt_dict_conf_fname')
kt_dict_conf_fname_obj.addRawData('1111 1st1st1st')
kt_dict_conf_fname_obj.addRawData('2222 2nd2nd2nd')
kt_dict_conf_fname_obj.write()
#set kateid_to_fc_tradeid dict to empty
kt2fc_dict_conf_fname_obj = FileFactory_obj.getFileInstance('kateid_to_fc_tradeid_dir/kateid_to_fc_tradeid_fname'??version="0")
kt2fc_dict_conf_fname_obj.write()
#set kate black list to empty
kt_dict_conf_fname_obj = FileFactory_obj.getFileInstance('kate_black_list_dir/kate_black_list_fname'??version="0")
kt_dict_conf_fname_obj.write()
#set hot term dict to empty
hot_term_dir_hot_term_fname_0_obj = FileFactory_obj.getFileInstance('hot_term_dir/hot_term_fname'??version='0')
hot_term_dir_hot_term_fname_0_obj.write()
hot_term_dir_hot_term_fname_1_obj = FileFactory_obj.getFileInstance('hot_term_dir/hot_term_fname'??version='1')
hot_term_dir_hot_term_fname_1_obj.write()
#set kate dict
one_req_0 = g_caseGlobal.luasDriver.addReq()
self.luas_katelib=one_req_0.addKateLib()
kate_text = KateText("1st1st1st")
kate_text.add_KateItem(KateItem(id="34"??score=2.3??prob=3.3??label=2))
self.luas_katelib.addKateText(kate_text)
kate_text = KateText("2nd2nd2nd")
kate_text.add_KateItem(KateItem(id="99999"??score=2.3??prob=3.3??label=2))
self.luas_katelib.addKateText(kate_text)
#set LUUI request
luas_request_0 = one_req_0.addLuas_query()
luas_request_0.__protobuf_obj__.req_keyword_num[0]=2
luas_request_0.__protobuf_obj__.publisher_settings_list_id.append(494)
luas_request_0.__protobuf_obj__.seller_network_id = 8
#set dmp server response QT??word_id=0
#????lu-ui????lu-as????????xfs??????
query_word_0=luas_request_0.__protobuf_obj__.query_word.add()
query_word_0.word_id=1111
query_word_0.weight = 10
query_word_0.basic_weight = 10
query_word_0.sign = 421524911880790740
query_word_1=luas_request_0.__protobuf_obj__.query_word.add()
query_word_1.word_id=2222
query_word_1.weight = 20
query_word_1.basic_weight = 20
query_word_1.sign = 403240651640081344
#dump to file??
g_caseGlobal.luasDriver.write()
#?????????????????
#luas ?????luui ??response
def check(self):
self.addAssert(0??'{"qpres_log":"2nd2nd2nd"??"keywords":[{"lu_word":"2nd2nd2nd"}]}')