Commit 39217a44 by liuxiaoxing

微服务测试用例

parent 6211af47
...@@ -14,20 +14,20 @@ import hashlib ...@@ -14,20 +14,20 @@ import hashlib
# from jiami.md5 import get_str_sha1_secret_str # from jiami.md5 import get_str_sha1_secret_str
# 向短链发送点击数据 # 向短链发送点击数据
# 广告创意ID # 广告创意ID
ry_adcreative_id = '333' ry_adcreative_id = '767556'
# 广告组ID # 广告组ID
ry_adgroup_id = '333' ry_adgroup_id = '564534'
# 广告计划ID # 广告计划ID
ry_adplan_id = '333' ry_adplan_id = '3453534'
# 广告组名称 # 广告组名称
ry_adgroup_name = '新版测试-广告组' ry_adgroup_name = 'snktt-cz'
# 广告计划名称 # 广告计划名称
ry_adplan_name = '新版测试-计划' ry_adplan_name = 'snktt-czx-pt-s'
# 广告创意名称 # 广告创意名称
ry_adcreative_name = '新版测试创意' ry_adcreative_name = 'snktt-czx-p'
# bytedance_int 今日头条,kuaishou_int 快手,tencentams_int (新)广点通,rryingxiao_int 人人营销 # bytedance_int 今日头条,kuaishou_int 快手,tencentams_int (新)广点通,rryingxiao_int 人人营销
pid = 'rryingxiao_int' pid = 'rryingxiao_int'
URL = 'http://10.2.20.42:8083/tkio/faeQZfa?noredirect=true' URL = 'http://uri6.com/tkio/NJVNjaa?noredirect=true'
# 测试头条衍生事件回调时加上 # 测试头条衍生事件回调时加上
# callback= http%3A%2F%2Fad.toutiao.com%2Ftrack%2Factivate%2F%3Fcallback%3DCKP4rs-Zn4QDEKiQ6teZn4QDGN6L8Y-h9Wcg3ovxj6H1ZyiE0PjgroSEAzAOOM_X-8IDQik0YWY1NzdlOC1lZmViLTRmZDEtYmZkZC00MzE1Zjc1MmJhMGF1NTQ5M0iA0pOtA1AAiAEAkAECmAEA%26os%3D0%26muid%3D # callback= http%3A%2F%2Fad.toutiao.com%2Ftrack%2Factivate%2F%3Fcallback%3DCKP4rs-Zn4QDEKiQ6teZn4QDGN6L8Y-h9Wcg3ovxj6H1ZyiE0PjgroSEAzAOOM_X-8IDQik0YWY1NzdlOC1lZmViLTRmZDEtYmZkZC00MzE1Zjc1MmJhMGF1NTQ5M0iA0pOtA1AAiAEAkAECmAEA%26os%3D0%26muid%3D
# URL = 'http://uri6.com/adapt/encryp/love.match.set-bytedance?noredirect=true&pid=rryingxiao_int&callback=D8311DBF28D751F327B83F7CEE5B8850B88CC74C8C3FF628EB3A48CAE2212EE260EE347E1771382C5F1B2C0FC9E8921CB5245576D7E5C1EF680315AAA98DCFB189F66FBA49CC7BCB8E4B4726D6D363B816BB2133CADC80B1C12D9FE464A05ED974A70A646BAB1D4D78E2A75361676D5A0D3D4E52B7E7C6B72E9388C17FE9384BE1A47503AABEFB9423727DBAC7B7275AAD237E0E2774D2A8C3D0FDC895CE10C0CCE38F8FEDBC24AF2E23B2B5E742B50C07744361334E148979087917DFFFC445A74B9F939412DEF8D060474E1D353ED7E2EB636B32CADF29842BB90E2131BD3ED05D1A0438EA0EA8577613780B3D64377D85E758A2B20507A034A2C8A96077C7E200C410188C78F76B9B5E7F3E5E4AC3' # URL = 'http://uri6.com/adapt/encryp/love.match.set-bytedance?noredirect=true&pid=rryingxiao_int&callback=D8311DBF28D751F327B83F7CEE5B8850B88CC74C8C3FF628EB3A48CAE2212EE260EE347E1771382C5F1B2C0FC9E8921CB5245576D7E5C1EF680315AAA98DCFB189F66FBA49CC7BCB8E4B4726D6D363B816BB2133CADC80B1C12D9FE464A05ED974A70A646BAB1D4D78E2A75361676D5A0D3D4E52B7E7C6B72E9388C17FE9384BE1A47503AABEFB9423727DBAC7B7275AAD237E0E2774D2A8C3D0FDC895CE10C0CCE38F8FEDBC24AF2E23B2B5E742B50C07744361334E148979087917DFFFC445A74B9F939412DEF8D060474E1D353ED7E2EB636B32CADF29842BB90E2131BD3ED05D1A0438EA0EA8577613780B3D64377D85E758A2B20507A034A2C8A96077C7E200C410188C78F76B9B5E7F3E5E4AC3'
...@@ -40,7 +40,12 @@ URL = 'http://10.2.20.42:8083/tkio/faeQZfa?noredirect=true' ...@@ -40,7 +40,12 @@ URL = 'http://10.2.20.42:8083/tkio/faeQZfa?noredirect=true'
# 7e3aa681f68435b3f74de790d6424690 # 7e3aa681f68435b3f74de790d6424690
# 4eab4be709defbfc2cc85826b09caea0 # 4eab4be709defbfc2cc85826b09caea0
# 6ba2b016f280004d10a1a354e426eceb # 6ba2b016f280004d10a1a354e426eceb
appkey = '99624d617e08b7be64a600b56c7af335' # md5加密
def computeMD5upper(message):
m = hashlib.md5()
m.update(message.encode(encoding='utf-8'))
return m.hexdigest().upper()
appkey = '8a390227254c03dbcaddbca009cd6e8b'
lst = [] lst = []
nowTime = datetime.datetime.now().strftime('%Y-%m-%d %H:%M:%S') nowTime = datetime.datetime.now().strftime('%Y-%m-%d %H:%M:%S')
s = 0 s = 0
...@@ -78,12 +83,13 @@ for index in range(1): ...@@ -78,12 +83,13 @@ for index in range(1):
# 随机生成ip # 随机生成ip
ip = socket.inet_ntoa(struct.pack('>I', random.randint(1, 0xffffffff))) ip = socket.inet_ntoa(struct.pack('>I', random.randint(1, 0xffffffff)))
# ip = '156.119.456.199' # ip = '156.119.456.190'
try: try:
parms = { parms = {
'click_time':str(round(time.time() * 1000)), 'click_time':str(round(time.time() * 1000)),
# 'androidid': '86ab7f6642bdde717709216e68d0b', # 'androidid': '86ab7f6642bdde717709216e68d0b',
'imei': i, 'imei': i,
'imei_MD5': computeMD5upper(i),
# 'campuuid': '@#¥%……&……%¥#@#¥%&……&*****', # 'campuuid': '@#¥%……&……%¥#@#¥%&……&*****',
# 'clickid': '测试测试', # 'clickid': '测试测试',
# "idfa": '583D2BB0-B19C-4A9A-A600-2A1EB2FB7E30', # "idfa": '583D2BB0-B19C-4A9A-A600-2A1EB2FB7E30',
...@@ -103,9 +109,9 @@ for index in range(1): ...@@ -103,9 +109,9 @@ for index in range(1):
# 'ry_adgroup_name': ry_adgroup_name, # 'ry_adgroup_name': ry_adgroup_name,
# 'ry_adplan_name': ry_adplan_name, # 'ry_adplan_name': ry_adplan_name,
# 'ry_adcreative_name': ry_adcreative_name, # 'ry_adcreative_name': ry_adcreative_name,
"ry_adgroup_id": ry_adgroup_id, # "ry_adgroup_id": ry_adgroup_id,
"ry_adplan_id": ry_adplan_id, # "ry_adplan_id": ry_adplan_id,
"ry_adcreative_id": ry_adcreative_id, # "ry_adcreative_id": ry_adcreative_id,
# 'imei2': 'null', # 'imei2': 'null',
# 'meid': i # 'meid': i
# 'bd_vid': i # 'bd_vid': i
...@@ -146,6 +152,8 @@ for index in range(1): ...@@ -146,6 +152,8 @@ for index in range(1):
# verify = False # verify = False
p = requests.get(url=URL, params=parms, timeout=10, verify=False) p = requests.get(url=URL, params=parms, timeout=10, verify=False)
print('imei:', i) print('imei:', i)
print('imeimd5:', computeMD5upper(i))
print("ip:", ip) print("ip:", ip)
# print("accountid:", accountid) # print("accountid:", accountid)
print(p.text) print(p.text)
...@@ -166,7 +174,7 @@ for index in range(1): ...@@ -166,7 +174,7 @@ for index in range(1):
# print('androidid', a) # print('androidid', a)
w = w + 1 w = w + 1
# time.sleep(13) # time.sleep(10)
# try: # try:
# allEvent().installUpload(i, ip, appkey) # allEvent().installUpload(i, ip, appkey)
# # allEvent().formevent(i, ip, appkey) # # allEvent().formevent(i, ip, appkey)
...@@ -174,14 +182,14 @@ for index in range(1): ...@@ -174,14 +182,14 @@ for index in range(1):
# except Exception: # except Exception:
# print('install_wrong:', w) # print('install_wrong:', w)
# w = w + 1 # w = w + 1
#
#
# time.sleep(5) # time.sleep(5)
# try: # try:
# allEvent().registerEvent(i, ip, appkey) # allEvent().registerEvent(i, ip, appkey)
# except Exception as e: # except Exception as e:
# print('注册_wrong:', w) # print('注册_wrong:', w)
# # print(e) # print(e)
# time.sleep(4) # time.sleep(4)
# try: # try:
# allEvent().loginEvent(i, ip, appkey) # allEvent().loginEvent(i, ip, appkey)
...@@ -198,6 +206,7 @@ for index in range(1): ...@@ -198,6 +206,7 @@ for index in range(1):
# allEvent().payorder(i, ip, appkey) # allEvent().payorder(i, ip, appkey)
# except Exception: # except Exception:
# print('订单_wrong:', w) # print('订单_wrong:', w)
# time.sleep(10)
# try: # try:
# allEvent().invoke_test(i, ip, appkey) # allEvent().invoke_test(i, ip, appkey)
# except Exception: # except Exception:
......
...@@ -68,9 +68,7 @@ class allEvent: ...@@ -68,9 +68,7 @@ class allEvent:
s = json.dumps({ s = json.dumps({
# "what":'install', # "what":'install',
"appid": appkey, "appid": appkey,
# "appType": "wap",
"context": { "context": {
# "_apptype": "wap",
"_carrier": carrier, "_carrier": carrier,
"_networkwhat_type": network_type, "_networkwhat_type": network_type,
"_ryosversion": ryosversion, "_ryosversion": ryosversion,
...@@ -78,15 +76,15 @@ class allEvent: ...@@ -78,15 +76,15 @@ class allEvent:
"_pkgname": "com.yanjing.yami", "_pkgname": "com.yanjing.yami",
# "_campaignid": 'default', # "_campaignid": 'default',
"_deviceid": i, "_deviceid": i,
# "_imei": i, "_imei": 'E83DC0B76BC1691CB9C45E5A63468660',
'_oaid': '697134960e9ff8df46f21b4f97db595a1', # '_oaid': '697134960e9ff8df46f21b4f97db595a1',
"_rdid": '09DA91D0664C33DA7BEE7294CCCCCA07', # "_rdid": '09DA91D0664C33DA7BEE7294CCCCCA07',
# 'ua': 'Mozilla/5.0 (Linux; U; Android 7.0; zh-CN; Nexus 5X Build/NRD90M) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/40.0.2214.89 UCBrowser/11.4.5.937 Mobile Safari/537.36', # 'ua': 'Mozilla/5.0 (Linux; U; Android 7.0; zh-CN; Nexus 5X Build/NRD90M) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/40.0.2214.89 UCBrowser/11.4.5.937 Mobile Safari/537.36',
"idfa": i, # "idfa": i,
# "_current_caid": "00_A0FF634AEDF1403205A4A6A1118CDA61_A66338F33BEBB40F5CD65F198AF2F40C", # "_current_caid": "00_A0FF634AEDF1403205A4A6A1118CDA61_A66338F33BEBB40F5CD65F198AF2F40C",
# "gxid": "876543567543565", # "gxid": "876543567543565",
# "_idfv": i, # "_idfv": i,
"_androidid": '86ab7f6642bdde717709216e68d0b', # "_androidid": '86ab7f6642bdde717709216e68d0b',
# "_imei2":"324323AAAA", # "_imei2":"324323AAAA",
# "_meid": "CCC324323", # "_meid": "CCC324323",
"_ip": IP, "_ip": IP,
...@@ -158,7 +156,7 @@ class allEvent: ...@@ -158,7 +156,7 @@ class allEvent:
# "_deviceid": "5C70287B-27F5-4AC3-9E9C-2D67B8CF1065" # "_deviceid": "5C70287B-27F5-4AC3-9E9C-2D67B8CF1065"
}, },
'when': '2021-01-17 23:59:36', 'when': time.strftime('%Y-%m-%d %H:%M:%S', time.localtime(time.time())),
# time.strftime('%Y-%m-%d %H:%M:%S', time.localtime(time.time())) # time.strftime('%Y-%m-%d %H:%M:%S', time.localtime(time.time()))
# 'ds': ds, # 'ds': ds,
'who': 'lxx_test' 'who': 'lxx_test'
...@@ -350,7 +348,9 @@ class allEvent: ...@@ -350,7 +348,9 @@ class allEvent:
def payorder(self, i, IP, appkey): def payorder(self, i, IP, appkey):
# 订单号 # 订单号
transactionid = ''.join(str(random.choice(range(10))) for _ in range(19)) # transactionid = ''.join(str(random.choice(range(10))) for _ in range(19))
transactionid = '765432454364342'
s = json.dumps({ s = json.dumps({
'what': 'order', 'what': 'order',
'appid': appkey, 'appid': appkey,
...@@ -409,17 +409,17 @@ class allEvent: ...@@ -409,17 +409,17 @@ class allEvent:
p = requests.post(url=URL + 'event', data=s, headers=headers, timeout=5) p = requests.post(url=URL + 'event', data=s, headers=headers, timeout=5)
print("自定义" + p.text) print("自定义" + p.text)
# 自定义事件 # 自定义事件
def invoke_test(self, i, IP, appkey): def invoke_test(self, i, IP, appkey):
s = json.dumps({ s = json.dumps({
"what": "invoke", "what": "invoke",
"appType": "", "appType": "",
"appid": appkey, "appid": appkey,
"context": { "context": {
"_campaignid": "_default_", # "_campaignid": "_default_",
"_rydevicetype": "iPhone", "_rydevicetype": "iPhone",
"_ip": IP, "_ip": IP,
# '_oaid':'7c5c102b782c33e',
"_ryosversion": ryosversion, "_ryosversion": ryosversion,
"_manufacturer": "苹果", "_manufacturer": "苹果",
"frequency": "0.000", "frequency": "0.000",
...@@ -428,26 +428,25 @@ class allEvent: ...@@ -428,26 +428,25 @@ class allEvent:
"_deviceid": i, "_deviceid": i,
"_device_gps": "unknown", "_device_gps": "unknown",
"_jbk": "0", "_jbk": "0",
"_timestamp": "1565941809351", "_timestamp": current_time_13,
"_imei": i, "_imei": i,
# "_idfa": "DBC43622-E34B-440C-B7A7-FB6641D0D9AB", # "_idfa": "DBC43622-E34B-440C-B7A7-FB6641D0D9AB",
"_idfv": i, # "_idfv": i,
"_lib_version": lv, "_lib_version": lv,
"_carrier": carrier, "_carrier": carrier,
"_ry_ts": "1565941809416", "_ry_ts": current_time_13,
"_create_timestamp": "1565941809351", "_create_timestamp": current_time_13,
"_tz": "+8", "_tz": "+8",
"_pkgname": "com.reyun.sdktrackingtest", "_pkgname": "com.reyun.sdktrackingtest",
"_ipv6": "fe80::1cf8:ea60:3508:1dc2", "_ipv6": "fe80::1cf8:ea60:3508:1dc2",
"modify": "0", "modify": "0",
# "_ry_origin_when": "2019-08-16 15:50:09", # "_ry_origin_when": "2019-08-16 15:50:09",
"_resolution": "736*414", "_resolution": "736*414",
"_ryos": "iOS", "_ryos": "android",
"_model": model, "_model": model,
# "_mac": "02:00:00:00:00:00", # "_mac": "02:00:00:00:00:00",
"_network_type": "WIFI", "_network_type": "WIFI",
# "_androidid": "5432453421342654", # "_androidid": "5432453421342654",
"_lats": "1" "_lats": "1"
}, },
"where": "event", "where": "event",
...@@ -458,8 +457,8 @@ class allEvent: ...@@ -458,8 +457,8 @@ class allEvent:
p = requests.post(url=URL + 'event', data=s, headers=headers, timeout=5) p = requests.post(url=URL + 'event', data=s, headers=headers, timeout=5)
print("自定义" + p.text) print("自定义" + p.text)
# 广告展示
# 广告展示
def adshow(self, i, IP, appkey, adid): def adshow(self, i, IP, appkey, adid):
s = json.dumps({ s = json.dumps({
"appid": appkey, "appid": appkey,
......
...@@ -8,7 +8,7 @@ import hashlib ...@@ -8,7 +8,7 @@ import hashlib
#安卓常规渠道激活 #安卓常规渠道激活
appkey = 'f3f4db967187590e6c0b5cc158106788' appkey = 'ae6f9fb7e7bc336bffb63de711c7bec0'
# 线上预约app # 线上预约app
# 7f64fbd64513bc74aa6b5bf753ae0953 # 7f64fbd64513bc74aa6b5bf753ae0953
# 16dc0cb882d3dbec4f7f66251a84d6dd # 16dc0cb882d3dbec4f7f66251a84d6dd
...@@ -27,6 +27,7 @@ appkey = 'f3f4db967187590e6c0b5cc158106788' ...@@ -27,6 +27,7 @@ appkey = 'f3f4db967187590e6c0b5cc158106788'
# ip = socket.inet_ntoa(struct.pack('>I', random.randint(1, 0xffffffff))) # ip = socket.inet_ntoa(struct.pack('>I', random.randint(1, 0xffffffff)))
# allEvent().payEvent(i, ip, appkey) # allEvent().payEvent(i, ip, appkey)
for index in range(1): for index in range(1):
# 随机生成12为数组 # 随机生成12为数组
s = ''.join(str(random.choice(range(10))) for _ in range(18)) s = ''.join(str(random.choice(range(10))) for _ in range(18))
...@@ -37,18 +38,18 @@ for index in range(1): ...@@ -37,18 +38,18 @@ for index in range(1):
# p = '987654321234567' # p = '987654321234567'
# s = '2321321312h8ro321' # s = '2321321312h8ro321'
# i = ''.join(str(random.choice(range(10))) for _ in range(12)) i = ''.join(str(random.choice(range(10))) for _ in range(12))
i = '583D2BB0-B19C-4A9A-A600-2A1EB2FB7E30' # i = '885709229829'
# i = '00000000-0000-0000-0000-000000000000' # i = '00000000-0000-0000-0000-000000000000'
# 随机生成ipXXXX XXCB489741-0029-4A35-8E38-D142F836B623 # 随机生成ipXXXX XXCB489741-0029-4A35-8E38-D142F836B623
ip = socket.inet_ntoa(struct.pack('>I', random.randint(1, 0xffffffff))) ip = socket.inet_ntoa(struct.pack('>I', random.randint(1, 0xffffffff)))
# ip = '12.23.21.2' # ip = '110.186.108.28'
# 地域测试ip # 地域测试ip
# 60.13.148.23 新疆维吾尔自治区吐鲁番市 # 60.13.148.23 新疆维吾尔自治区吐鲁番市
# 61.139.239.255 广西壮族自治区北海市 # 61.139.239.255 广西壮族自治区北海市
# 119.60.0.0 宁夏回族自治区银川市 # 119.60.0.0 宁夏回族自治区银川市
allEvent().installUpload(i, ip, appkey) allEvent().installUpload(i, ip, appkey)
# time.sleep(1) time.sleep(1)
allEvent().startupEvent(i, ip, appkey) allEvent().startupEvent(i, ip, appkey)
# # time.sleep(1) # # time.sleep(1)
# allEvent().loginEvent(i, ip, appkey) # allEvent().loginEvent(i, ip, appkey)
...@@ -60,7 +61,7 @@ for index in range(1): ...@@ -60,7 +61,7 @@ for index in range(1):
# time.sleep(1) # time.sleep(1)
# num = index + 1 # num = index + 1
# event = 'event_' + str(num) # event = 'event_' + str(num)
# event = 'event_10' # # event = 'event_10'
# allEvent().ziding_event(i, ip, appkey, event) # allEvent().ziding_event(i, ip, appkey, event)
# print(s) # print(s)
# s = int(s) + 1 # s = int(s) + 1
...@@ -69,7 +70,7 @@ for index in range(1): ...@@ -69,7 +70,7 @@ for index in range(1):
# allEvent().adclick(i,ip,appkey,adid) # allEvent().adclick(i,ip,appkey,adid)
# allEvent().pageduration(i,ip,appkey,se,p) # allEvent().pageduration(i,ip,appkey,se,p)
# allEvent().appduration(i,ip,appkey,s) # allEvent().appduration(i,ip,appkey,s)
# allEvent().invoke_tewst(i,ip,appkey) # allEvent().invoke_test(i,ip,appkey)
# allEvent().retentionEvent(i, ip, appkey) # allEvent().retentionEvent(i, ip, appkey)
# #
# allEvent().formevent(i,ip,appkey) # allEvent().formevent(i,ip,appkey)
......
...@@ -10,24 +10,24 @@ appkey = '16dc0cb882d3dbec4f7f66251a84d6dd' ...@@ -10,24 +10,24 @@ appkey = '16dc0cb882d3dbec4f7f66251a84d6dd'
# 4b25b8a4dc584e63e9a7b81c3adedf2f # 4b25b8a4dc584e63e9a7b81c3adedf2f
# event = 'event_10' # event = 'event_10'
cmpaignid = '233445' cmpaignid = '112233'
for index in range(1): for index in range(1):
# 随机生成12为数组 # 随机生成12为数组
# i = ''.join(str(random.choice(range(10))) for _ in range(12)) i = ''.join(str(random.choice(range(10))) for _ in range(12))
i = '691007221237' # i = '691007221237'
# 随机生成ip # 随机生成ip
ip = socket.inet_ntoa(struct.pack('>I', random.randint(1, 0xffffffff))) ip = socket.inet_ntoa(struct.pack('>I', random.randint(1, 0xffffffff)))
# ip = '143.205.125.236' # ip = '143.205.125.236'
# allEvent().installUpload(i, ip, appkey, cmpaignid) allEvent().installUpload(i, ip, appkey, cmpaignid)
# time.sleep(3) # time.sleep(3)
# allEvent().loginEvent(i, ip, appkey) # allEvent().loginEvent(i, ip, appkey)
allEvent().orderEvent(i, ip, appkey) # allEvent().orderEvent(i, ip, appkey)
time.sleep(1) # time.sleep(1)
# num = index + 1 # num = index + 1
# event = 'event_' + str(num) # event = 'event_' + str(num)
# allEvent().ziding_event(i, ip, appkey,event) # allEvent().ziding_event(i, ip, appkey,event)
allEvent().payEvent(i, ip, appkey) # allEvent().payEvent(i, ip, appkey)
# allEvent().registerEvent(i, ip, appkey) # allEvent().registerEvent(i, ip, appkey)
# allEvent().invoke_test(i, ip, appkey,cmpaignid) # allEvent().invoke_test(i, ip, appkey,cmpaignid)
......
...@@ -8,10 +8,10 @@ import string ...@@ -8,10 +8,10 @@ import string
#向短链发送点击数据 #向短链发送点击数据
#渠道短链 #渠道短链
URL = 'http://10.2.20.42:8083/tkio/zemI32a?noredirect=true' URL = 'http://uri6.com/tkio/vMn2eea?callback_param=CL7A6NrdsYkDEJvwi8jjsYkDGIuiwN6i9QQgwtWF84UCKIPAq-za2ogDMAw4wbgCQiIyMDIyMDQxNjIzMzM1MjAxMDEzMzEyNjE0NzBEM0VCRkMySMG4AlAAiAECkAECmAEAcallback=http%3A%2F%2Fad.toutiao.com%2Ftrack%2Factivate%2F%3Fcallback%3DCL7A6NrdsYkDEJvwi8jjsYkDGIuiwN6i9QQgwtWF84UCKIPAq-za2ogDMAw4wbgCQiIyMDIyMDQxNjIzMzM1MjAxMDEzMzEyNjE0NzBEM0VCRkMySMG4AlAAiAECkAECmAEA%26os%3D1%26muid%3DA76A313F-A1D6-4BED-8C21-C16B2EEFC618&noredirect=true&ry_dp=true&rydp_path=null&rydp_url=https%3A%2F%2F123&noredirect=true'
appkey = 'f3f4db967187590e6c0b5cc158106788' appkey = '3f2706b7afdf89d95ffa7d2e9cc13e2e'
# URL = 'http://172.31.19.255:8083/tkio/VNNjQra' # URL = 'http://172.31.19.255:8083/tkio/VNNjQra'
event = 'event_1' event = 'invoke'
# 广告创意ID # 广告创意ID
ry_adcreative_id = '8886453253' ry_adcreative_id = '8886453253'
# 广告组ID # 广告组ID
...@@ -91,14 +91,14 @@ for _ in range(1): ...@@ -91,14 +91,14 @@ for _ in range(1):
print('idfa:', i) print('idfa:', i)
print('ip', ip) print('ip', ip)
w=w+1 w=w+1
time.sleep(10) # time.sleep(10)
try: # try:
allEvent().installUpload(i, ip, appkey) # allEvent().installUpload(i, ip, appkey)
# allEvent().formevent(i, ip, appkey) # # allEvent().formevent(i, ip, appkey)
#
except Exception: # except Exception:
print('install_wrong:', w) # print('install_wrong:', w)
w = w + 1 # w = w + 1
# time.sleep(3) # time.sleep(3)
# try: # try:
# allEvent().adshow(i, ip, appkey,adid) # allEvent().adshow(i, ip, appkey,adid)
...@@ -146,12 +146,12 @@ for _ in range(1): ...@@ -146,12 +146,12 @@ for _ in range(1):
# allEvent().loginEvent(i, ip, appkey) # allEvent().loginEvent(i, ip, appkey)
# except Exception: # except Exception:
# print('登录_wrong:', w) # print('登录_wrong:', w)
# time.sleep(5) time.sleep(10)
# try: try:
# allEvent().ziding_event(i, ip, appkey, event) allEvent().ziding_event(i, ip, appkey, event)
# except Exception as err: except Exception as err:
# print(err) print(err)
# print('自定义_wrong:', w) print('自定义_wrong:', w)
# #
# time.sleep(10) # time.sleep(10)
# try: # try:
......
...@@ -7,8 +7,8 @@ import random ...@@ -7,8 +7,8 @@ import random
headers = {'Content-Type': 'application/json'} headers = {'Content-Type': 'application/json'}
URL = 'http://10.2.20.42:8080/receive/tkio/' # URL = 'http://10.2.20.42:8080/receive/tkio/'
# URL = 'http://log.trackingio.com/receive/tkio/' URL = 'http://log.trackingio.com/receive/tkio/'
# URL = 'http://jisulog.sortda.com/receive/tkio/' # URL = 'http://jisulog.sortda.com/receive/tkio/'
#时间戳 #时间戳
...@@ -91,50 +91,50 @@ class allEvent: ...@@ -91,50 +91,50 @@ class allEvent:
# 3.download + deviceId有归因结果asa_install_type = old_download对应1 # 3.download + deviceId有归因结果asa_install_type = old_download对应1
# 4.download + deviceId无归因结果asa_install_type = new_download对应2 # 4.download + deviceId无归因结果asa_install_type = new_download对应2
# # 转化类型,新增或重装,Download 或 Redownload # # 转化类型,新增或重装,Download 或 Redownload
# "iad-conversion-type": "Download", "iad-conversion-type": "Download",
#
# # 广告活动组ID(campaign group id) # 广告活动组ID(campaign group id)
# "iad-org-id": "432432432", "iad-org-id": "123456789",
# # 广告活动组名称(campaign group name) # 广告活动组名称(campaign group name)
# "iad-org-name": "name", "iad-org-name": "name",
#
# # 广告活动ID # 广告活动ID
# "iad-campaign-id": "111", "iad-campaign-id": "111",
# # 广告活动名称 # 广告活动名称
# "iad-campaign-name": "CampaignName", "iad-campaign-name": "CampaignName",
#
#
# # 广告组ID # 广告组ID
# "iad-adgroup-id": "111111", "iad-adgroup-id": "111111",
# # 广告组名称 # 广告组名称
# "iad-adgroup-name": "AdGroupName", "iad-adgroup-name": "AdGroupName",
#
#
# # 关键词 id # 关键词 id
# "iad-keyword-id": "111", "iad-keyword-id": "111",
# # 关键词 # 关键词
# "iad-keyword": "Keyword", "iad-keyword": "Keyword",
#
#
# # 素材ID # 素材ID
# "iad-creativeset-id": "111", "iad-creativeset-id": "111",
# # 素材名称 # 素材名称
# "iad-creativeset-name": "CreativeSetName", "iad-creativeset-name": "CreativeSetName",
#
# # 点击ASA广告时间 # 点击ASA广告时间
# "iad-click-date": '2021-06-24T11:32:33Z', "iad-click-date": '2021-06-24T11:32:33Z',
# # 本次下载完成的时间(仅ASA转化时,该值传且必传) # 本次下载完成的时间(仅ASA转化时,该值传且必传)
# "iad-conversion-date": when, "iad-conversion-date": when,
#
# # Broad 广泛匹配 ; Exact 完全匹配;SearchMatch 搜索匹配 # Broad 广泛匹配 ; Exact 完全匹配;SearchMatch 搜索匹配
# # 关键词匹配类型 # 关键词匹配类型
# "iad-keyword-matchtype": "SearchMatch", "iad-keyword-matchtype": "SearchMatch",
# #首次下载完成的时间(有可能包括非ASA转化,当为redownload且conversion date有值时,purchase date是第一次下载App的时间) #首次下载完成的时间(有可能包括非ASA转化,当为redownload且conversion date有值时,purchase date是第一次下载App的时间)
# "iad-purchase-date": '2021-06-24T11:32:33Z', "iad-purchase-date": '2021-06-24T11:32:33Z',
# # 归因结果 # 归因结果
# "iad-attribution": "true", "iad-attribution": "true",
# # 国家 # 国家
# "iad-country-or-region": "US", "iad-country-or-region": "US",
# 'asa_install_time':'2021-06-24T11:32:33Z', # 'asa_install_time':'2021-06-24T11:32:33Z',
...@@ -385,7 +385,8 @@ class allEvent: ...@@ -385,7 +385,8 @@ class allEvent:
'_ryosversion': ryosversion, '_ryosversion': ryosversion,
'__model': 'jixing', '__model': 'jixing',
"_lib_version": lv, "_lib_version": lv,
'_key_action_category': '1', '_key_action_threshold': '15', '_key_action_category': '1',
'_key_action_threshold': '15',
# 识别是否为自定义事件,默认传1 # 识别是否为自定义事件,默认传1
'_isreyundefaultevent': '1' '_isreyundefaultevent': '1'
}, },
......
...@@ -6,10 +6,10 @@ import string ...@@ -6,10 +6,10 @@ import string
import time import time
#iOS常规渠道激活 #iOS常规渠道激活
appkey = '44b56e7b7369d13643ec8961f6998b9b' appkey = '6012db28b7fbdfcb1e3a847756137f9b'
event = 'event_1' event = 'event_1'
for index in range(1): for index in range(30):
# 随机生成12为数组 # 随机生成12为数组
a = "".join(random.sample(string.ascii_letters + string.digits, 8)) a = "".join(random.sample(string.ascii_letters + string.digits, 8))
b = "".join(random.sample(string.ascii_letters + string.digits, 4)) b = "".join(random.sample(string.ascii_letters + string.digits, 4))
...@@ -17,14 +17,14 @@ for index in range(1): ...@@ -17,14 +17,14 @@ for index in range(1):
d = "".join(random.sample(string.ascii_letters + string.digits, 4)) d = "".join(random.sample(string.ascii_letters + string.digits, 4))
e = "".join(random.sample(string.ascii_letters + string.digits, 12)) e = "".join(random.sample(string.ascii_letters + string.digits, 12))
# i = (a + "-" + b + "-" + c + "-" + d + "-" + e).upper() i = (a + "-" + b + "-" + c + "-" + d + "-" + e).upper()
i = '583D2BB0-B19C-4A9A-A600-2A1EB2FB7E39' # i = '583D2BB0-B19C-4A9A-A600-2A1EB2FB7E39'
print(i) print(i)
adid = ''.join(str(random.choice(range(10))) for _ in range(12)) adid = ''.join(str(random.choice(range(10))) for _ in range(12))
# 随机生成ip # 随机生成ip
ip = socket.inet_ntoa(struct.pack('>I', random.randint(1, 0xffffffff))) ip = socket.inet_ntoa(struct.pack('>I', random.randint(1, 0xffffffff)))
# ip = '61.192.125.69' # ip = '61.192.125.69'
allEvent().installUpload(i,ip,appkey) # allEvent().installUpload(i,ip,appkey)
# allEvent().startupEvent(i, ip, appkey) # allEvent().startupEvent(i, ip, appkey)
# time.sleep(10) # time.sleep(10)
# allEvent().loginEvent(i, ip, appkey) # allEvent().loginEvent(i, ip, appkey)
...@@ -33,9 +33,9 @@ for index in range(1): ...@@ -33,9 +33,9 @@ for index in range(1):
# time.sleep(1) # time.sleep(1)
# allEvent().payorder(i, ip, appkey) # allEvent().payorder(i, ip, appkey)
# time.sleep(3) # time.sleep(3)
# num = index + 1 num = index + 1
# event = 'event_' + str(num) event = 'event_' + str(num)
# allEvent().ziding_event(i, ip, appkey, event) allEvent().ziding_event(i, ip, appkey, event)
# print(event) # print(event)
# allEvent().adshow(i,ip,appkey,adid) # allEvent().adshow(i,ip,appkey,adid)
# allEvent().adclick(i,ip,appkey,adid) # allEvent().adclick(i,ip,appkey,adid)
......
...@@ -62,7 +62,7 @@ def code_Nums(n=6): ...@@ -62,7 +62,7 @@ def code_Nums(n=6):
# device_id取值顺序-oaid不为空,取oaid # device_id取值顺序-oaid不为空,取oaid
def test_qz1(): def test_qz1():
redirectandroid.parms['oaid'] = i redirectandroid.parms['oaid'] = i
redirectandroid.send_request3("73iIZ3a", '') redirectandroid.send_request3('')
print(i) print(i)
...@@ -72,7 +72,7 @@ def test_qz2(): ...@@ -72,7 +72,7 @@ def test_qz2():
redirectandroid.parms['imei2'] = o redirectandroid.parms['imei2'] = o
redirectandroid.parms['mac'] = m redirectandroid.parms['mac'] = m
redirectandroid.parms['android_id'] = q redirectandroid.parms['android_id'] = q
redirectandroid.send_request3("73iIZ3a", '') redirectandroid.send_request3('')
print(i) print(i)
...@@ -81,7 +81,7 @@ def test_qz3(): ...@@ -81,7 +81,7 @@ def test_qz3():
redirectandroid.parms['imei2'] = i redirectandroid.parms['imei2'] = i
redirectandroid.parms['mac'] = m redirectandroid.parms['mac'] = m
redirectandroid.parms['android_id'] = q redirectandroid.parms['android_id'] = q
redirectandroid.send_request3("73iIZ3a", '') redirectandroid.send_request3('')
print(i) print(i)
...@@ -89,21 +89,21 @@ def test_qz3(): ...@@ -89,21 +89,21 @@ def test_qz3():
def test_qz4(): def test_qz4():
redirectandroid.parms['mac'] = m redirectandroid.parms['mac'] = m
redirectandroid.parms['android_id'] = q redirectandroid.parms['android_id'] = q
redirectandroid.send_request3("73iIZ3a", '') redirectandroid.send_request3('')
print(m) print(m)
# device_id取值顺序-oaid,imei1,imei2,mac为空,android_id,ipv4不为空,取android_id # device_id取值顺序-oaid,imei1,imei2,mac为空,android_id,ipv4不为空,取android_id
def test_qz5(): def test_qz5():
redirectandroid.parms['android_id'] = q redirectandroid.parms['android_id'] = q
redirectandroid.send_request3("73iIZ3a", '') redirectandroid.send_request3('')
print(q) print(q)
# device_id取值顺序-oaid,imei1,imei2,mac,android_id为空,ipv4不为空,取ipv4 # device_id取值顺序-oaid,imei1,imei2,mac,android_id为空,ipv4不为空,取ipv4
def test_qz6(): def test_qz6():
redirectandroid.parms['ipv4'] = ip redirectandroid.parms['ipv4'] = ip
redirectandroid.send_request3("73iIZ3a", '') redirectandroid.send_request3('')
print(ip) print(ip)
...@@ -118,7 +118,7 @@ def test_qz7(): ...@@ -118,7 +118,7 @@ def test_qz7():
redirectandroid.parms['gaid_md5'] = computeMD5(g) redirectandroid.parms['gaid_md5'] = computeMD5(g)
redirectandroid.parms['mac_md5'] = computeMD5(m) redirectandroid.parms['mac_md5'] = computeMD5(m)
redirectandroid.parms['android_id_md5'] = computeMD5(a) redirectandroid.parms['android_id_md5'] = computeMD5(a)
redirectandroid.send_request3("73iIZ3a", '') redirectandroid.send_request3('')
print(i) print(i)
print(computeMD5(i)) print(computeMD5(i))
...@@ -131,7 +131,7 @@ def test_qz8(): ...@@ -131,7 +131,7 @@ def test_qz8():
redirectandroid.parms['gaid_md5'] = computeMD5(g) redirectandroid.parms['gaid_md5'] = computeMD5(g)
redirectandroid.parms['mac_md5'] = computeMD5(m) redirectandroid.parms['mac_md5'] = computeMD5(m)
redirectandroid.parms['android_id_md5'] = computeMD5(a) redirectandroid.parms['android_id_md5'] = computeMD5(a)
redirectandroid.send_request3("73iIZ3a", '') redirectandroid.send_request3('')
print(i) print(i)
print(computeMD5(i)) print(computeMD5(i))
...@@ -142,7 +142,7 @@ def test_qz9(): ...@@ -142,7 +142,7 @@ def test_qz9():
redirectandroid.parms['gaid_md5'] = computeMD5(g) redirectandroid.parms['gaid_md5'] = computeMD5(g)
redirectandroid.parms['mac_md5'] = computeMD5(m) redirectandroid.parms['mac_md5'] = computeMD5(m)
redirectandroid.parms['android_id_md5'] = computeMD5(a) redirectandroid.parms['android_id_md5'] = computeMD5(a)
redirectandroid.send_request3("73iIZ3a", '') redirectandroid.send_request3('')
print(computeMD5(i2)) print(computeMD5(i2))
...@@ -152,7 +152,7 @@ def test_qz10(): ...@@ -152,7 +152,7 @@ def test_qz10():
redirectandroid.parms['mac_md5'] = computeMD5(m) redirectandroid.parms['mac_md5'] = computeMD5(m)
redirectandroid.parms['gaid_md5'] = computeMD5(g) redirectandroid.parms['gaid_md5'] = computeMD5(g)
redirectandroid.parms['android_id_md5'] = computeMD5(a) redirectandroid.parms['android_id_md5'] = computeMD5(a)
redirectandroid.send_request3("73iIZ3a", '') redirectandroid.send_request3('')
print(m) print(m)
print(computeMD5(m)) print(computeMD5(m))
...@@ -162,7 +162,7 @@ def test_qz10(): ...@@ -162,7 +162,7 @@ def test_qz10():
def test_qz11(): def test_qz11():
redirectandroid.parms['gaid_md5'] = computeMD5(g) redirectandroid.parms['gaid_md5'] = computeMD5(g)
redirectandroid.parms['android_id_md5'] = computeMD5(a) redirectandroid.parms['android_id_md5'] = computeMD5(a)
redirectandroid.send_request3("73iIZ3a", '') redirectandroid.send_request3('')
print(a) print(a)
print(computeMD5(a)) print(computeMD5(a))
...@@ -172,8 +172,8 @@ def test_qz11(): ...@@ -172,8 +172,8 @@ def test_qz11():
def test_atb1(): def test_atb1():
i = code_nums(12) i = code_nums(12)
redirectandroid.parms['oaid'] = i redirectandroid.parms['oaid'] = i
redirectandroid.send_request3("73iIZ3a", '') redirectandroid.send_request3('')
time.sleep(10) time.sleep(5)
receiveandroid.data[0]['device_info']['device_id'] = i receiveandroid.data[0]['device_info']['device_id'] = i
receiveandroid.data[0]['device_info']['oaid'] = i receiveandroid.data[0]['device_info']['oaid'] = i
receiveandroid.data[0]['device_info']['device_id_type'] = 'oaid' receiveandroid.data[0]['device_info']['device_id_type'] = 'oaid'
...@@ -186,7 +186,7 @@ def test_atb1(): ...@@ -186,7 +186,7 @@ def test_atb1():
def test_atb2(): def test_atb2():
i = code_nums(12) i = code_nums(12)
redirectandroid.parms['imei1'] = i redirectandroid.parms['imei1'] = i
redirectandroid.send_request3("73iIZ3a", '') redirectandroid.send_request3('')
time.sleep(10) time.sleep(10)
receiveandroid.data[0]['device_info']['device_id'] = i receiveandroid.data[0]['device_info']['device_id'] = i
receiveandroid.data[0]['device_info']['imei1'] = i receiveandroid.data[0]['device_info']['imei1'] = i
...@@ -199,7 +199,7 @@ def test_atb2(): ...@@ -199,7 +199,7 @@ def test_atb2():
def test_atb3(): def test_atb3():
i = code_nums(12) i = code_nums(12)
redirectandroid.parms['imei2'] = i redirectandroid.parms['imei2'] = i
redirectandroid.send_request3("73iIZ3a", '') redirectandroid.send_request3('')
time.sleep(10) time.sleep(10)
receiveandroid.data[0]['device_info']['device_id'] = i receiveandroid.data[0]['device_info']['device_id'] = i
receiveandroid.data[0]['device_info']['imei2'] = i receiveandroid.data[0]['device_info']['imei2'] = i
...@@ -212,7 +212,7 @@ def test_atb3(): ...@@ -212,7 +212,7 @@ def test_atb3():
def test_atb4(): def test_atb4():
m = code_nums(17) m = code_nums(17)
redirectandroid.parms['mac'] = m redirectandroid.parms['mac'] = m
redirectandroid.send_request3("73iIZ3a", '') redirectandroid.send_request3('')
time.sleep(10) time.sleep(10)
receiveandroid.data[0]['device_info']['device_id'] = m receiveandroid.data[0]['device_info']['device_id'] = m
receiveandroid.data[0]['device_info']['mac'] = m receiveandroid.data[0]['device_info']['mac'] = m
...@@ -226,7 +226,7 @@ def test_atb5(): ...@@ -226,7 +226,7 @@ def test_atb5():
g = code_nums(36) g = code_nums(36)
redirectandroid.parms['gaid'] = g redirectandroid.parms['gaid'] = g
redirectandroid.parms['imei1'] = q redirectandroid.parms['imei1'] = q
redirectandroid.send_request3("73iIZ3a", '') redirectandroid.send_request3('')
time.sleep(10) time.sleep(10)
receiveandroid.data[0]['device_info']['gaid'] = g receiveandroid.data[0]['device_info']['gaid'] = g
receiveandroid.data[0]['device_info']['device_id'] = i receiveandroid.data[0]['device_info']['device_id'] = i
...@@ -241,7 +241,7 @@ def test_atb5(): ...@@ -241,7 +241,7 @@ def test_atb5():
def test_atb6(): def test_atb6():
redirectandroid.parms['imei1_md5'] = md redirectandroid.parms['imei1_md5'] = md
redirectandroid.parms['imei1'] = i redirectandroid.parms['imei1'] = i
redirectandroid.send_request3("73iIZ3a", '') redirectandroid.send_request3('')
time.sleep(10) time.sleep(10)
receiveandroid.data[0]['device_info']['device_id'] = o receiveandroid.data[0]['device_info']['device_id'] = o
receiveandroid.data[0]['device_info']['imei1_md5'] = md receiveandroid.data[0]['device_info']['imei1_md5'] = md
...@@ -258,7 +258,7 @@ def test_atb6(): ...@@ -258,7 +258,7 @@ def test_atb6():
def test_atb7(): def test_atb7():
redirectandroid.parms['imei2_md5'] = md redirectandroid.parms['imei2_md5'] = md
redirectandroid.parms['imei1'] = i redirectandroid.parms['imei1'] = i
redirectandroid.send_request3("73iIZ3a", '') redirectandroid.send_request3('')
time.sleep(10) time.sleep(10)
receiveandroid.data[0]['device_info']['device_id'] = o receiveandroid.data[0]['device_info']['device_id'] = o
receiveandroid.data[0]['device_info']['imei2_md5'] = md receiveandroid.data[0]['device_info']['imei2_md5'] = md
...@@ -266,18 +266,17 @@ def test_atb7(): ...@@ -266,18 +266,17 @@ def test_atb7():
receiveandroid.data[0]['device_info']['device_id_type'] = 'imei1' receiveandroid.data[0]['device_info']['device_id_type'] = 'imei1'
receiveandroid.data[0]['device_info']['device_id_md5_type'] = 'imei2_md5' receiveandroid.data[0]['device_info']['device_id_md5_type'] = 'imei2_md5'
receiveandroid.data[0]['device_info']['device_id_md5'] = md receiveandroid.data[0]['device_info']['device_id_md5'] = md
receiveandroid.send_request() receiveandroid.send_request()
print(o) print(o)
# 安卓精准归因-oaid_md5归因 # 安卓精准归因-oaid_md5归因
def test_atb8(): def test_atb8():
redirectandroid.parms['oaid_md5'] = md redirectandroid.parms['oaid_md5'] = md
redirectandroid.parms['imei1'] = i redirectandroid.parms['imei1'] = i
redirectandroid.send_request3("73iIZ3a", '') redirectandroid.send_request3('')
time.sleep(10) time.sleep(5)
receiveandroid.data[0]['device_info']['device_id'] = o receiveandroid.data[0]['device_info']['device_id'] = o
receiveandroid.data[0]['device_info']['oaid_md5'] = md receiveandroid.data[0]['device_info']['oaid_md5'] = md
receiveandroid.data[0]['device_info']['imei1'] = o receiveandroid.data[0]['device_info']['imei1'] = o
...@@ -294,8 +293,8 @@ def test_atb8(): ...@@ -294,8 +293,8 @@ def test_atb8():
def test_atb44(): def test_atb44():
redirectandroid.parms['mac_md5'] = md redirectandroid.parms['mac_md5'] = md
redirectandroid.parms['imei1'] = i redirectandroid.parms['imei1'] = i
redirectandroid.send_request3("73iIZ3a", '') redirectandroid.send_request3('')
time.sleep(10) time.sleep(5)
receiveandroid.data[0]['device_info']['device_id'] = o receiveandroid.data[0]['device_info']['device_id'] = o
receiveandroid.data[0]['device_info']['mac_md5'] = md receiveandroid.data[0]['device_info']['mac_md5'] = md
receiveandroid.data[0]['device_info']['imei1'] = o receiveandroid.data[0]['device_info']['imei1'] = o
...@@ -308,12 +307,13 @@ def test_atb44(): ...@@ -308,12 +307,13 @@ def test_atb44():
# 安卓精准归因-gaid_md5归因 # 安卓精准归因-gaid_md5归因
def test_atb9(): def test_atb9():
redirectandroid.parms['gaid_md5'] = md redirectandroid.parms['gaid_md5'] = md
redirectandroid.parms['imei1'] = i redirectandroid.parms['imei1'] = i
redirectandroid.send_request3("73iIZ3a", '') redirectandroid.send_request3('')
time.sleep(10) time.sleep(5)
receiveandroid.data[0]['device_info']['device_id'] = o receiveandroid.data[0]['device_info']['device_id'] = o
receiveandroid.data[0]['device_info']['gaid_md5'] = md receiveandroid.data[0]['device_info']['gaid_md5'] = md
receiveandroid.data[0]['device_info']['imei1'] = o receiveandroid.data[0]['device_info']['imei1'] = o
...@@ -331,8 +331,8 @@ def test_atb9(): ...@@ -331,8 +331,8 @@ def test_atb9():
def test_atb10(): def test_atb10():
imei1 = code_nums(12) imei1 = code_nums(12)
redirectandroid.parms['imei1'] = imei1.upper() redirectandroid.parms['imei1'] = imei1.upper()
redirectandroid.send_request3("73iIZ3a", '') redirectandroid.send_request3('')
time.sleep(10) time.sleep(5)
receiveandroid.data[0]['device_info']['device_id'] = imei1 receiveandroid.data[0]['device_info']['device_id'] = imei1
receiveandroid.data[0]['device_info']['imei1'] = imei1 receiveandroid.data[0]['device_info']['imei1'] = imei1
receiveandroid.data[0]['device_info']['device_id_type'] = 'imei1' receiveandroid.data[0]['device_info']['device_id_type'] = 'imei1'
...@@ -345,7 +345,7 @@ def test_atb10(): ...@@ -345,7 +345,7 @@ def test_atb10():
def test_atb14(): def test_atb14():
imei2 = code_nums(12) imei2 = code_nums(12)
redirectandroid.parms['imei2'] = imei2.upper() redirectandroid.parms['imei2'] = imei2.upper()
redirectandroid.send_request3("73iIZ3a", '') redirectandroid.send_request3('')
time.sleep(10) time.sleep(10)
receiveandroid.data[0]['device_info']['device_id'] = i receiveandroid.data[0]['device_info']['device_id'] = i
receiveandroid.data[0]['device_info']['imei1'] = i receiveandroid.data[0]['device_info']['imei1'] = i
...@@ -374,7 +374,7 @@ def test_atb11(): ...@@ -374,7 +374,7 @@ def test_atb11():
def test_atb12(): def test_atb12():
m = code_nums(17) m = code_nums(17)
redirectandroid.parms['mac'] = m.upper() redirectandroid.parms['mac'] = m.upper()
redirectandroid.send_request3("73iIZ3a", '') redirectandroid.send_request3('')
time.sleep(10) time.sleep(10)
receiveandroid.data[0]['device_info']['device_id'] = m receiveandroid.data[0]['device_info']['device_id'] = m
receiveandroid.data[0]['device_info']['mac'] = m receiveandroid.data[0]['device_info']['mac'] = m
...@@ -388,7 +388,7 @@ def test_atb13(): ...@@ -388,7 +388,7 @@ def test_atb13():
g = code_nums(36) g = code_nums(36)
redirectandroid.parms['gaid'] = g.upper() redirectandroid.parms['gaid'] = g.upper()
redirectandroid.parms['imei1'] = q redirectandroid.parms['imei1'] = q
redirectandroid.send_request3("73iIZ3a", '') redirectandroid.send_request3('')
time.sleep(10) time.sleep(10)
receiveandroid.data[0]['device_info']['gaid'] = g receiveandroid.data[0]['device_info']['gaid'] = g
receiveandroid.data[0]['device_info']['device_id'] = i receiveandroid.data[0]['device_info']['device_id'] = i
...@@ -403,7 +403,7 @@ def test_atb13(): ...@@ -403,7 +403,7 @@ def test_atb13():
def test_atb15(): def test_atb15():
imei1 = code_nums(12) imei1 = code_nums(12)
redirectandroid.parms['imei1'] = imei1 redirectandroid.parms['imei1'] = imei1
redirectandroid.send_request3("73iIZ3a", '') redirectandroid.send_request3('')
time.sleep(10) time.sleep(10)
receiveandroid.data[0]['device_info']['device_id'] = imei1.upper() receiveandroid.data[0]['device_info']['device_id'] = imei1.upper()
receiveandroid.data[0]['device_info']['imei1'] = imei1.upper() receiveandroid.data[0]['device_info']['imei1'] = imei1.upper()
...@@ -417,7 +417,7 @@ def test_atb15(): ...@@ -417,7 +417,7 @@ def test_atb15():
def test_atb16(): def test_atb16():
imei2 = code_nums(12) imei2 = code_nums(12)
redirectandroid.parms['imei2'] = imei2 redirectandroid.parms['imei2'] = imei2
redirectandroid.send_request3("73iIZ3a", '') redirectandroid.send_request3('')
time.sleep(10) time.sleep(10)
receiveandroid.data[0]['device_info']['device_id'] = i receiveandroid.data[0]['device_info']['device_id'] = i
receiveandroid.data[0]['device_info']['imei1'] = i receiveandroid.data[0]['device_info']['imei1'] = i
...@@ -433,7 +433,7 @@ def test_atb16(): ...@@ -433,7 +433,7 @@ def test_atb16():
def test_atb17(): def test_atb17():
i = code_nums(12) i = code_nums(12)
redirectandroid.parms['oaid'] = i redirectandroid.parms['oaid'] = i
redirectandroid.send_request3("73iIZ3a", '') redirectandroid.send_request3('')
time.sleep(10) time.sleep(10)
receiveandroid.data[0]['device_info']['device_id'] = i.upper() receiveandroid.data[0]['device_info']['device_id'] = i.upper()
receiveandroid.data[0]['device_info']['oaid'] = i.upper() receiveandroid.data[0]['device_info']['oaid'] = i.upper()
...@@ -449,7 +449,7 @@ def test_atb17(): ...@@ -449,7 +449,7 @@ def test_atb17():
def test_atb18(): def test_atb18():
m = code_nums(17) m = code_nums(17)
redirectandroid.parms['mac'] = m redirectandroid.parms['mac'] = m
redirectandroid.send_request3("73iIZ3a", '') redirectandroid.send_request3('')
time.sleep(10) time.sleep(10)
receiveandroid.data[0]['device_info']['device_id'] = m.upper() receiveandroid.data[0]['device_info']['device_id'] = m.upper()
receiveandroid.data[0]['device_info']['mac'] = m.upper() receiveandroid.data[0]['device_info']['mac'] = m.upper()
...@@ -464,7 +464,7 @@ def test_atb19(): ...@@ -464,7 +464,7 @@ def test_atb19():
g = code_nums(36) g = code_nums(36)
redirectandroid.parms['gaid'] = g redirectandroid.parms['gaid'] = g
redirectandroid.parms['imei1'] = q redirectandroid.parms['imei1'] = q
redirectandroid.send_request3("73iIZ3a", '') redirectandroid.send_request3('')
time.sleep(10) time.sleep(10)
receiveandroid.data[0]['device_info']['gaid'] = g.upper() receiveandroid.data[0]['device_info']['gaid'] = g.upper()
receiveandroid.data[0]['device_info']['device_id'] = i receiveandroid.data[0]['device_info']['device_id'] = i
...@@ -480,7 +480,7 @@ def test_atb20(): ...@@ -480,7 +480,7 @@ def test_atb20():
md =code_nums(32) md =code_nums(32)
redirectandroid.parms['imei1_md5'] = md.upper() redirectandroid.parms['imei1_md5'] = md.upper()
redirectandroid.parms['imei1'] = i redirectandroid.parms['imei1'] = i
redirectandroid.send_request3("73iIZ3a", '') redirectandroid.send_request3('')
time.sleep(10) time.sleep(10)
receiveandroid.data[0]['device_info']['device_id'] = o receiveandroid.data[0]['device_info']['device_id'] = o
receiveandroid.data[0]['device_info']['imei1_md5'] = md receiveandroid.data[0]['device_info']['imei1_md5'] = md
...@@ -496,7 +496,7 @@ def test_atb21(): ...@@ -496,7 +496,7 @@ def test_atb21():
md =code_nums(32) md =code_nums(32)
redirectandroid.parms['imei2_md5'] = md.upper() redirectandroid.parms['imei2_md5'] = md.upper()
redirectandroid.parms['imei1'] = i redirectandroid.parms['imei1'] = i
redirectandroid.send_request3("73iIZ3a", '') redirectandroid.send_request3( '')
time.sleep(10) time.sleep(10)
receiveandroid.data[0]['device_info']['device_id'] = o receiveandroid.data[0]['device_info']['device_id'] = o
receiveandroid.data[0]['device_info']['imei2_md5'] = md receiveandroid.data[0]['device_info']['imei2_md5'] = md
...@@ -512,7 +512,7 @@ def test_atb22(): ...@@ -512,7 +512,7 @@ def test_atb22():
md =code_nums(32) md =code_nums(32)
redirectandroid.parms['oaid_md5'] = md.upper() redirectandroid.parms['oaid_md5'] = md.upper()
redirectandroid.parms['imei1'] = i redirectandroid.parms['imei1'] = i
redirectandroid.send_request3("73iIZ3a", '') redirectandroid.send_request3('')
time.sleep(10) time.sleep(10)
receiveandroid.data[0]['device_info']['device_id'] = o receiveandroid.data[0]['device_info']['device_id'] = o
receiveandroid.data[0]['device_info']['oaid_md5'] = md receiveandroid.data[0]['device_info']['oaid_md5'] = md
...@@ -529,7 +529,7 @@ def test_atb23(): ...@@ -529,7 +529,7 @@ def test_atb23():
md =code_nums(32) md =code_nums(32)
redirectandroid.parms['mac_md5'] = md.upper() redirectandroid.parms['mac_md5'] = md.upper()
redirectandroid.parms['imei1'] = i redirectandroid.parms['imei1'] = i
redirectandroid.send_request3("73iIZ3a", '') redirectandroid.send_request3('')
time.sleep(10) time.sleep(10)
receiveandroid.data[0]['device_info']['device_id'] = o receiveandroid.data[0]['device_info']['device_id'] = o
receiveandroid.data[0]['device_info']['mac_md5'] = md receiveandroid.data[0]['device_info']['mac_md5'] = md
...@@ -545,7 +545,7 @@ def test_atb24(): ...@@ -545,7 +545,7 @@ def test_atb24():
md =code_nums(32) md =code_nums(32)
redirectandroid.parms['gaid_md5'] = md.upper() redirectandroid.parms['gaid_md5'] = md.upper()
redirectandroid.parms['imei1'] = i redirectandroid.parms['imei1'] = i
redirectandroid.send_request3("73iIZ3a", '') redirectandroid.send_request3( '')
time.sleep(10) time.sleep(10)
receiveandroid.data[0]['device_info']['device_id'] = o receiveandroid.data[0]['device_info']['device_id'] = o
receiveandroid.data[0]['device_info']['gaid_md5'] = md receiveandroid.data[0]['device_info']['gaid_md5'] = md
...@@ -561,7 +561,7 @@ def test_atb25(): ...@@ -561,7 +561,7 @@ def test_atb25():
md =code_nums(32) md =code_nums(32)
redirectandroid.parms['imei1_md5'] = md redirectandroid.parms['imei1_md5'] = md
redirectandroid.parms['imei1'] = i redirectandroid.parms['imei1'] = i
redirectandroid.send_request3("73iIZ3a", '') redirectandroid.send_request3('')
time.sleep(10) time.sleep(10)
receiveandroid.data[0]['device_info']['device_id'] = o receiveandroid.data[0]['device_info']['device_id'] = o
receiveandroid.data[0]['device_info']['imei1_md5'] = md.upper() receiveandroid.data[0]['device_info']['imei1_md5'] = md.upper()
...@@ -577,7 +577,7 @@ def test_atb26(): ...@@ -577,7 +577,7 @@ def test_atb26():
md =code_nums(32) md =code_nums(32)
redirectandroid.parms['imei2_md5'] = md redirectandroid.parms['imei2_md5'] = md
redirectandroid.parms['imei1'] = i redirectandroid.parms['imei1'] = i
redirectandroid.send_request3("73iIZ3a", '') redirectandroid.send_request3('')
time.sleep(10) time.sleep(10)
receiveandroid.data[0]['device_info']['device_id'] = o receiveandroid.data[0]['device_info']['device_id'] = o
receiveandroid.data[0]['device_info']['imei2_md5'] = md.upper() receiveandroid.data[0]['device_info']['imei2_md5'] = md.upper()
...@@ -594,7 +594,7 @@ def test_atb27(): ...@@ -594,7 +594,7 @@ def test_atb27():
md =code_nums(32) md =code_nums(32)
redirectandroid.parms['oaid_md5'] = md redirectandroid.parms['oaid_md5'] = md
redirectandroid.parms['imei1'] = i redirectandroid.parms['imei1'] = i
redirectandroid.send_request3("73iIZ3a", '') redirectandroid.send_request3('')
time.sleep(10) time.sleep(10)
receiveandroid.data[0]['device_info']['device_id'] = o receiveandroid.data[0]['device_info']['device_id'] = o
receiveandroid.data[0]['device_info']['oaid_md5'] = md.upper() receiveandroid.data[0]['device_info']['oaid_md5'] = md.upper()
...@@ -611,7 +611,7 @@ def test_atb28(): ...@@ -611,7 +611,7 @@ def test_atb28():
md =code_nums(32) md =code_nums(32)
redirectandroid.parms['mac_md5'] = md redirectandroid.parms['mac_md5'] = md
redirectandroid.parms['imei1'] = i redirectandroid.parms['imei1'] = i
redirectandroid.send_request3("73iIZ3a", '') redirectandroid.send_request3('')
time.sleep(10) time.sleep(10)
receiveandroid.data[0]['device_info']['device_id'] = o receiveandroid.data[0]['device_info']['device_id'] = o
receiveandroid.data[0]['device_info']['mac_md5'] = md.upper() receiveandroid.data[0]['device_info']['mac_md5'] = md.upper()
...@@ -627,7 +627,7 @@ def test_atb29(): ...@@ -627,7 +627,7 @@ def test_atb29():
md =code_nums(32) md =code_nums(32)
redirectandroid.parms['gaid_md5'] = md redirectandroid.parms['gaid_md5'] = md
redirectandroid.parms['imei1'] = i redirectandroid.parms['imei1'] = i
redirectandroid.send_request3("73iIZ3a", '') redirectandroid.send_request3('')
time.sleep(10) time.sleep(10)
receiveandroid.data[0]['device_info']['device_id'] = o receiveandroid.data[0]['device_info']['device_id'] = o
receiveandroid.data[0]['device_info']['gaid_md5'] = md.upper() receiveandroid.data[0]['device_info']['gaid_md5'] = md.upper()
...@@ -644,7 +644,7 @@ def test_atb29(): ...@@ -644,7 +644,7 @@ def test_atb29():
def test_atb30(): def test_atb30():
i = code_nums(16) i = code_nums(16)
redirectandroid.parms['android_id'] = i redirectandroid.parms['android_id'] = i
redirectandroid.send_request3("73iIZ3a", '') redirectandroid.send_request3('')
time.sleep(10) time.sleep(10)
receiveandroid.data[0]['device_info']['device_id'] = '' receiveandroid.data[0]['device_info']['device_id'] = ''
receiveandroid.data[0]['device_info']['device_id_type'] = '' receiveandroid.data[0]['device_info']['device_id_type'] = ''
...@@ -932,8 +932,8 @@ def test_atb40(): ...@@ -932,8 +932,8 @@ def test_atb40():
o = '5284047f4ffb4e04824a2fd1d1f0cd62' o = '5284047f4ffb4e04824a2fd1d1f0cd62'
redirectandroid.parms['oaid_md5'] = o redirectandroid.parms['oaid_md5'] = o
redirectandroid.parms['ipv4'] = ip redirectandroid.parms['ipv4'] = ip
redirectandroid.send_request3("73iIZ3a", '') redirectandroid.send_request3('')
time.sleep(10) time.sleep(3)
receiveandroid.data[0]['device_info']['device_id'] = a receiveandroid.data[0]['device_info']['device_id'] = a
receiveandroid.data[0]['device_info']['device_id_type'] = 'imei1' receiveandroid.data[0]['device_info']['device_id_type'] = 'imei1'
receiveandroid.data[0]['device_info']['oaid'] = '' receiveandroid.data[0]['device_info']['oaid'] = ''
...@@ -944,7 +944,7 @@ def test_atb40(): ...@@ -944,7 +944,7 @@ def test_atb40():
receiveandroid.data[0]['device_info']['imei2_md5'] = '' receiveandroid.data[0]['device_info']['imei2_md5'] = ''
receiveandroid.data[0]['device_info']['mac'] = '' receiveandroid.data[0]['device_info']['mac'] = ''
receiveandroid.data[0]['device_info']['mac_md5'] = '' receiveandroid.data[0]['device_info']['mac_md5'] = ''
receiveandroid.data[0]['device_info']['imei1'] = '' receiveandroid.data[0]['device_info']['imei1'] = a
receiveandroid.data[0]['device_info']['imei1_md5'] = '' receiveandroid.data[0]['device_info']['imei1_md5'] = ''
receiveandroid.data[0]['device_info']['gaid'] = '' receiveandroid.data[0]['device_info']['gaid'] = ''
receiveandroid.data[0]['device_info']['gaid_md5'] = '' receiveandroid.data[0]['device_info']['gaid_md5'] = ''
......
...@@ -60,7 +60,7 @@ def test_atb1(): ...@@ -60,7 +60,7 @@ def test_atb1():
redirectios.parms['ipv4'] = ip redirectios.parms['ipv4'] = ip
redirectios.parms[ redirectios.parms[
'ua'] = 'iOS / Chrome 34: Mozilla/5.0 (iPad; CPU OS 7_0_4 like Mac OS X) AppleWebKit/537.51.1 (KHTML, like Gecko) CriOS/34.0.1847.18 Mobile/11B554a Safari/9537.53' 'ua'] = 'iOS / Chrome 34: Mozilla/5.0 (iPad; CPU OS 7_0_4 like Mac OS X) AppleWebKit/537.51.1 (KHTML, like Gecko) CriOS/34.0.1847.18 Mobile/11B554a Safari/9537.53'
redirectios.send_request3('mURv22a', '') redirectios.send_request3('')
print(i) print(i)
...@@ -74,7 +74,7 @@ def test_atb2(): ...@@ -74,7 +74,7 @@ def test_atb2():
redirectios.parms['idfv'] = v redirectios.parms['idfv'] = v
redirectios.parms['idfv_md5'] = computeMD5(v) redirectios.parms['idfv_md5'] = computeMD5(v)
redirectios.parms['ipv4'] = ip redirectios.parms['ipv4'] = ip
redirectios.send_request3('mURv22a', '') redirectios.send_request3('')
print(i) print(i)
...@@ -85,7 +85,7 @@ def test_atb3(): ...@@ -85,7 +85,7 @@ def test_atb3():
v = idfvcode() v = idfvcode()
redirectios.parms['idfa'] = i redirectios.parms['idfa'] = i
redirectios.parms['idfa_md5'] = computeMD5(i) redirectios.parms['idfa_md5'] = computeMD5(i)
redirectios.send_request3('mURv22a', '') redirectios.send_request3('')
time.sleep(8) time.sleep(8)
receiveios.data[0]['device_info']['idfa'] = i receiveios.data[0]['device_info']['idfa'] = i
receiveios.data[0]['device_info']['idfa_md5'] = computeMD5(i) receiveios.data[0]['device_info']['idfa_md5'] = computeMD5(i)
...@@ -105,7 +105,7 @@ def test_atb4(): ...@@ -105,7 +105,7 @@ def test_atb4():
v = idfvcode() v = idfvcode()
redirectios.parms['idfa'] = i.lower() redirectios.parms['idfa'] = i.lower()
redirectios.parms['idfa_md5'] = '' redirectios.parms['idfa_md5'] = ''
redirectios.send_request3('mURv22a', '') redirectios.send_request3('')
time.sleep(8) time.sleep(8)
receiveios.data[0]['device_info']['idfa'] = i receiveios.data[0]['device_info']['idfa'] = i
receiveios.data[0]['device_info']['idfa_md5'] = '' receiveios.data[0]['device_info']['idfa_md5'] = ''
...@@ -125,7 +125,7 @@ def test_atb5(): ...@@ -125,7 +125,7 @@ def test_atb5():
v = idfvcode() v = idfvcode()
redirectios.parms['idfa'] = i redirectios.parms['idfa'] = i
redirectios.parms['idfa_md5'] = '' redirectios.parms['idfa_md5'] = ''
redirectios.send_request3('mURv22a', '') redirectios.send_request3('')
time.sleep(8) time.sleep(8)
receiveios.data[0]['device_info']['idfa'] = i.lower() receiveios.data[0]['device_info']['idfa'] = i.lower()
receiveios.data[0]['device_info']['idfa_md5'] = '' receiveios.data[0]['device_info']['idfa_md5'] = ''
...@@ -145,7 +145,7 @@ def test_atb6(): ...@@ -145,7 +145,7 @@ def test_atb6():
v = idfvcode() v = idfvcode()
redirectios.parms['idfa'] = i redirectios.parms['idfa'] = i
redirectios.parms['idfa_md5'] = computeMD5(i) redirectios.parms['idfa_md5'] = computeMD5(i)
redirectios.send_request3('mURv22a', '') redirectios.send_request3('')
time.sleep(8) time.sleep(8)
receiveios.data[0]['device_info']['idfa'] = '' receiveios.data[0]['device_info']['idfa'] = ''
receiveios.data[0]['device_info']['idfa_md5'] = computeMD5(i) receiveios.data[0]['device_info']['idfa_md5'] = computeMD5(i)
...@@ -165,7 +165,7 @@ def test_atb7(): ...@@ -165,7 +165,7 @@ def test_atb7():
v = idfvcode() v = idfvcode()
redirectios.parms['idfa'] = i redirectios.parms['idfa'] = i
redirectios.parms['idfa_md5'] = computeMD5(i) redirectios.parms['idfa_md5'] = computeMD5(i)
redirectios.send_request3('mURv22a', '') redirectios.send_request3('')
time.sleep(8) time.sleep(8)
receiveios.data[0]['device_info']['idfa'] = '' receiveios.data[0]['device_info']['idfa'] = ''
receiveios.data[0]['device_info']['idfa_md5'] = computeMD5upper(i) receiveios.data[0]['device_info']['idfa_md5'] = computeMD5upper(i)
...@@ -185,7 +185,7 @@ def test_atb8(): ...@@ -185,7 +185,7 @@ def test_atb8():
v = idfvcode() v = idfvcode()
redirectios.parms['idfa'] = i redirectios.parms['idfa'] = i
redirectios.parms['idfa_md5'] = computeMD5upper(i) redirectios.parms['idfa_md5'] = computeMD5upper(i)
redirectios.send_request3('mURv22a', '') redirectios.send_request3('')
time.sleep(8) time.sleep(8)
receiveios.data[0]['device_info']['idfa'] = '' receiveios.data[0]['device_info']['idfa'] = ''
receiveios.data[0]['device_info']['idfa_md5'] = computeMD5(i) receiveios.data[0]['device_info']['idfa_md5'] = computeMD5(i)
...@@ -206,7 +206,7 @@ def test_atb9(): ...@@ -206,7 +206,7 @@ def test_atb9():
v = idfvcode() v = idfvcode()
redirectios.parms['idfa'] = i.lower() redirectios.parms['idfa'] = i.lower()
redirectios.parms['idfa_md5'] = computeMD5(i) redirectios.parms['idfa_md5'] = computeMD5(i)
redirectios.send_request3('mURv22a', '') redirectios.send_request3('')
time.sleep(8) time.sleep(8)
receiveios.data[0]['device_info']['idfa'] = i receiveios.data[0]['device_info']['idfa'] = i
receiveios.data[0]['device_info']['idfa_md5'] = '' receiveios.data[0]['device_info']['idfa_md5'] = ''
...@@ -220,7 +220,7 @@ def test_atb9(): ...@@ -220,7 +220,7 @@ def test_atb9():
print(i) print(i)
# idfa点击为小写,iafa激活为大写,idfa_md5点击有值,激活无值,实时侧添加md5加密值,归因方式为md5 # idfa_md5激活无值,实时侧添idfa_md5加密值
def test_atb31(): def test_atb31():
i = idfacode() i = idfacode()
v = idfvcode() v = idfvcode()
...@@ -249,7 +249,7 @@ def test_atb10(): ...@@ -249,7 +249,7 @@ def test_atb10():
redirectios.parms['idfa'] = '00000000-0000-0000-0000-000000000000' redirectios.parms['idfa'] = '00000000-0000-0000-0000-000000000000'
redirectios.parms['idfa_md5'] = '' redirectios.parms['idfa_md5'] = ''
redirectios.parms['ipv4'] = ip1 redirectios.parms['ipv4'] = ip1
redirectios.send_request3('mURv22a', '') redirectios.send_request3('')
time.sleep(8) time.sleep(8)
receiveios.data[0]['device_info']['idfa'] = '00000000-0000-0000-0000-000000000000' receiveios.data[0]['device_info']['idfa'] = '00000000-0000-0000-0000-000000000000'
receiveios.data[0]['device_info']['idfa_md5'] = '' receiveios.data[0]['device_info']['idfa_md5'] = ''
...@@ -273,7 +273,7 @@ def test_atb11(): ...@@ -273,7 +273,7 @@ def test_atb11():
redirectios.parms['idfa'] = '' redirectios.parms['idfa'] = ''
redirectios.parms['idfa_md5'] = '9f89c84a559f573636a47ff8daed0d33' redirectios.parms['idfa_md5'] = '9f89c84a559f573636a47ff8daed0d33'
redirectios.parms['ipv4'] = ip1 redirectios.parms['ipv4'] = ip1
redirectios.send_request3('mURv22a', '') redirectios.send_request3('')
time.sleep(8) time.sleep(8)
receiveios.data[0]['device_info']['idfa'] = '00000000-0000-0000-0000-000000000000' receiveios.data[0]['device_info']['idfa'] = '00000000-0000-0000-0000-000000000000'
receiveios.data[0]['device_info']['idfa_md5'] = '9f89c84a559f573636a47ff8daed0d33' receiveios.data[0]['device_info']['idfa_md5'] = '9f89c84a559f573636a47ff8daed0d33'
...@@ -297,7 +297,7 @@ def test_atb12(): ...@@ -297,7 +297,7 @@ def test_atb12():
redirectios.parms['idfa'] = '' redirectios.parms['idfa'] = ''
redirectios.parms['idfa_md5'] = '' redirectios.parms['idfa_md5'] = ''
redirectios.parms['ipv4'] = ip1 redirectios.parms['ipv4'] = ip1
redirectios.send_request3('mURv22a', '') redirectios.send_request3('')
time.sleep(8) time.sleep(8)
receiveios.data[0]['device_info']['idfa'] = '00000000-0000-0000-0000-000000000000' receiveios.data[0]['device_info']['idfa'] = '00000000-0000-0000-0000-000000000000'
receiveios.data[0]['device_info']['idfa_md5'] = '' receiveios.data[0]['device_info']['idfa_md5'] = ''
...@@ -330,7 +330,7 @@ def test_atb13(): ...@@ -330,7 +330,7 @@ def test_atb13():
redirectios.parms['idfa_md5'] = '' redirectios.parms['idfa_md5'] = ''
redirectios.parms['ipv4'] = ip redirectios.parms['ipv4'] = ip
redirectios.parms['ua'] = ua redirectios.parms['ua'] = ua
redirectios.send_request3('mURv22a', '') redirectios.send_request3('')
time.sleep(8) time.sleep(8)
receiveios.data[0]['device_info']['idfa'] = '00000000-0000-0000-0000-000000000000' receiveios.data[0]['device_info']['idfa'] = '00000000-0000-0000-0000-000000000000'
receiveios.data[0]['device_info']['idfa_md5'] = '' receiveios.data[0]['device_info']['idfa_md5'] = ''
...@@ -361,7 +361,7 @@ def test_atb14(): ...@@ -361,7 +361,7 @@ def test_atb14():
redirectios.parms['idfa_md5'] = '' redirectios.parms['idfa_md5'] = ''
redirectios.parms['ipv4'] = ip redirectios.parms['ipv4'] = ip
redirectios.parms['ua'] = ua1 redirectios.parms['ua'] = ua1
redirectios.send_request3('mURv22a', '') redirectios.send_request3('')
time.sleep(8) time.sleep(8)
receiveios.data[0]['device_info']['idfa'] = '00000000-0000-0000-0000-000000000000' receiveios.data[0]['device_info']['idfa'] = '00000000-0000-0000-0000-000000000000'
receiveios.data[0]['device_info']['idfa_md5'] = '' receiveios.data[0]['device_info']['idfa_md5'] = ''
...@@ -389,7 +389,7 @@ def test_atb15(): ...@@ -389,7 +389,7 @@ def test_atb15():
redirectios.parms['idfa_md5'] = '' redirectios.parms['idfa_md5'] = ''
redirectios.parms['ipv4'] = ip redirectios.parms['ipv4'] = ip
redirectios.parms['ua'] = ua1 redirectios.parms['ua'] = ua1
redirectios.send_request3('mURv22a', '') redirectios.send_request3('')
time.sleep(8) time.sleep(8)
receiveios.data[0]['device_info']['idfa'] = '00000000-0000-0000-0000-000000000000' receiveios.data[0]['device_info']['idfa'] = '00000000-0000-0000-0000-000000000000'
receiveios.data[0]['device_info']['idfa_md5'] = '' receiveios.data[0]['device_info']['idfa_md5'] = ''
...@@ -417,7 +417,7 @@ def test_atb16(): ...@@ -417,7 +417,7 @@ def test_atb16():
redirectios.parms['idfa_md5'] = '' redirectios.parms['idfa_md5'] = ''
redirectios.parms['ipv4'] = ip redirectios.parms['ipv4'] = ip
redirectios.parms['ua'] = ua2 redirectios.parms['ua'] = ua2
redirectios.send_request3('mURv22a', '') redirectios.send_request3('')
time.sleep(8) time.sleep(8)
receiveios.data[0]['device_info']['idfa'] = '00000000-0000-0000-0000-000000000000' receiveios.data[0]['device_info']['idfa'] = '00000000-0000-0000-0000-000000000000'
receiveios.data[0]['device_info']['idfa_md5'] = '' receiveios.data[0]['device_info']['idfa_md5'] = ''
...@@ -446,7 +446,7 @@ def test_atb17(): ...@@ -446,7 +446,7 @@ def test_atb17():
redirectios.parms['idfa_md5'] = '' redirectios.parms['idfa_md5'] = ''
redirectios.parms['ipv4'] = ip1 redirectios.parms['ipv4'] = ip1
redirectios.parms['ua'] = ua2 redirectios.parms['ua'] = ua2
redirectios.send_request3('mURv22a', '') redirectios.send_request3('')
time.sleep(8) time.sleep(8)
receiveios.data[0]['device_info']['idfa'] = '00000000-0000-0000-0000-000000000000' receiveios.data[0]['device_info']['idfa'] = '00000000-0000-0000-0000-000000000000'
receiveios.data[0]['device_info']['idfa_md5'] = '' receiveios.data[0]['device_info']['idfa_md5'] = ''
...@@ -469,7 +469,7 @@ def test_atb18(): ...@@ -469,7 +469,7 @@ def test_atb18():
v = idfvcode() v = idfvcode()
redirectios.parms['idfa'] = i redirectios.parms['idfa'] = i
redirectios.parms['idfa_md5'] = computeMD5(i) redirectios.parms['idfa_md5'] = computeMD5(i)
redirectios.send_request3('mURv22a', '') redirectios.send_request3('')
time.sleep(300) time.sleep(300)
redirectios.parms['idfa'] = i redirectios.parms['idfa'] = i
redirectios.parms['idfa_md5'] = computeMD5(i) redirectios.parms['idfa_md5'] = computeMD5(i)
...@@ -525,13 +525,13 @@ def test_atb20(): ...@@ -525,13 +525,13 @@ def test_atb20():
# ---------------------------激活有效期逻辑--------------------------- # ---------------------------激活有效期逻辑---------------------------
# 在激活有效期(104秒)之外:归因上之后,200秒后再次发送点击激活数据,查询归因接口,可再次归因 # 在激活有效期(104秒)之外:归因上之后,110秒后再次发送点击激活数据,查询归因接口,可再次归因
def test_atb21(): def test_atb21():
i = idfacode() i = idfacode()
v = idfvcode() v = idfvcode()
redirectios.parms['idfa'] = i redirectios.parms['idfa'] = i
redirectios.parms['idfa_md5'] = computeMD5(i) redirectios.parms['idfa_md5'] = computeMD5(i)
redirectios.send_request3('mURv22a', '') redirectios.send_request3('')
time.sleep(8) time.sleep(8)
receiveios.data[0]['device_info']['idfa'] = i receiveios.data[0]['device_info']['idfa'] = i
receiveios.data[0]['device_info']['idfa_md5'] = computeMD5(i) receiveios.data[0]['device_info']['idfa_md5'] = computeMD5(i)
...@@ -542,10 +542,10 @@ def test_atb21(): ...@@ -542,10 +542,10 @@ def test_atb21():
receiveios.data[0]['device_info']['device_id_type'] = 'idfa' receiveios.data[0]['device_info']['device_id_type'] = 'idfa'
receiveios.data[0]['device_info']['device_id_md5_type'] = 'idfa_md5' receiveios.data[0]['device_info']['device_id_md5_type'] = 'idfa_md5'
receiveios.send_request() receiveios.send_request()
time.sleep(200) time.sleep(110)
redirectios.parms['idfa'] = i redirectios.parms['idfa'] = i
redirectios.parms['idfa_md5'] = computeMD5(i) redirectios.parms['idfa_md5'] = computeMD5(i)
redirectios.send_request3('mURv22a', '') redirectios.send_request3('')
time.sleep(8) time.sleep(8)
receiveios.data[0]['device_info']['idfa'] = i receiveios.data[0]['device_info']['idfa'] = i
receiveios.data[0]['device_info']['idfa_md5'] = computeMD5(i) receiveios.data[0]['device_info']['idfa_md5'] = computeMD5(i)
...@@ -565,7 +565,7 @@ def test_atb22(): ...@@ -565,7 +565,7 @@ def test_atb22():
v = idfvcode() v = idfvcode()
redirectios.parms['idfa'] = i redirectios.parms['idfa'] = i
redirectios.parms['idfa_md5'] = computeMD5(i) redirectios.parms['idfa_md5'] = computeMD5(i)
redirectios.send_request3('mURv22a', '') redirectios.send_request3('')
time.sleep(8) time.sleep(8)
receiveios.data[0]['device_info']['idfa'] = i receiveios.data[0]['device_info']['idfa'] = i
receiveios.data[0]['device_info']['idfa_md5'] = computeMD5(i) receiveios.data[0]['device_info']['idfa_md5'] = computeMD5(i)
...@@ -595,7 +595,7 @@ def test_atb23(): ...@@ -595,7 +595,7 @@ def test_atb23():
v = idfvcode() v = idfvcode()
redirectios.parms['idfa'] = i redirectios.parms['idfa'] = i
redirectios.parms['idfa_md5'] = computeMD5(i) redirectios.parms['idfa_md5'] = computeMD5(i)
redirectios.send_request3('mURv22a', '') redirectios.send_request3('')
time.sleep(8) time.sleep(8)
receiveios.data[0]['device_info']['idfa'] = i receiveios.data[0]['device_info']['idfa'] = i
receiveios.data[0]['device_info']['idfa_md5'] = computeMD5(i) receiveios.data[0]['device_info']['idfa_md5'] = computeMD5(i)
...@@ -627,7 +627,7 @@ def test_atb24(): ...@@ -627,7 +627,7 @@ def test_atb24():
v = idfvcode() v = idfvcode()
redirectios.parms['idfa'] = i redirectios.parms['idfa'] = i
redirectios.parms['idfa_md5'] = computeMD5(i) redirectios.parms['idfa_md5'] = computeMD5(i)
redirectios.send_request3('mURv22a', '') redirectios.send_request3('')
time.sleep(60) time.sleep(60)
receiveios.data[0]['device_info']['idfa'] = i receiveios.data[0]['device_info']['idfa'] = i
receiveios.data[0]['device_info']['idfa_md5'] = computeMD5(i) receiveios.data[0]['device_info']['idfa_md5'] = computeMD5(i)
...@@ -648,7 +648,7 @@ def test_atb25(): ...@@ -648,7 +648,7 @@ def test_atb25():
v = idfvcode() v = idfvcode()
redirectios.parms['idfa'] = i redirectios.parms['idfa'] = i
redirectios.parms['idfa_md5'] = computeMD5(i) redirectios.parms['idfa_md5'] = computeMD5(i)
redirectios.send_request3('mURv22a', '') redirectios.send_request3('')
time.sleep(180) time.sleep(180)
receiveios.data[0]['device_info']['idfa'] = i receiveios.data[0]['device_info']['idfa'] = i
receiveios.data[0]['device_info']['idfa_md5'] = computeMD5(i) receiveios.data[0]['device_info']['idfa_md5'] = computeMD5(i)
...@@ -673,7 +673,7 @@ def test_atb26(): ...@@ -673,7 +673,7 @@ def test_atb26():
redirectios.parms['idfa_md5'] = '' redirectios.parms['idfa_md5'] = ''
redirectios.parms['ipv4'] = ip redirectios.parms['ipv4'] = ip
redirectios.parms['ua'] = ua redirectios.parms['ua'] = ua
redirectios.send_request3('mURv22a', '') redirectios.send_request3('')
time.sleep(20) time.sleep(20)
receiveios.data[0]['device_info']['idfa'] = '00000000-0000-0000-0000-000000000000' receiveios.data[0]['device_info']['idfa'] = '00000000-0000-0000-0000-000000000000'
receiveios.data[0]['device_info']['idfa_md5'] = '' receiveios.data[0]['device_info']['idfa_md5'] = ''
...@@ -699,7 +699,7 @@ def test_atb27(): ...@@ -699,7 +699,7 @@ def test_atb27():
redirectios.parms['idfa_md5'] = '' redirectios.parms['idfa_md5'] = ''
redirectios.parms['ipv4'] = ip redirectios.parms['ipv4'] = ip
redirectios.parms['ua'] = ua redirectios.parms['ua'] = ua
redirectios.send_request3('mURv22a', '') redirectios.send_request3('')
time.sleep(35) time.sleep(35)
receiveios.data[0]['device_info']['idfa'] = '00000000-0000-0000-0000-000000000000' receiveios.data[0]['device_info']['idfa'] = '00000000-0000-0000-0000-000000000000'
receiveios.data[0]['device_info']['idfa_md5'] = '' receiveios.data[0]['device_info']['idfa_md5'] = ''
...@@ -727,7 +727,7 @@ def test_atb28(): ...@@ -727,7 +727,7 @@ def test_atb28():
redirectios.parms['idfa_md5'] = '' redirectios.parms['idfa_md5'] = ''
redirectios.parms['ipv4'] = ip redirectios.parms['ipv4'] = ip
redirectios.parms['ua'] = ua1 redirectios.parms['ua'] = ua1
redirectios.send_request3('mURv22a', '') redirectios.send_request3('')
time.sleep(3) time.sleep(3)
receiveios.data[0]['device_info']['idfa'] = '00000000-0000-0000-0000-000000000000' receiveios.data[0]['device_info']['idfa'] = '00000000-0000-0000-0000-000000000000'
receiveios.data[0]['device_info']['idfa_md5'] = '' receiveios.data[0]['device_info']['idfa_md5'] = ''
...@@ -754,7 +754,7 @@ def test_atb29(): ...@@ -754,7 +754,7 @@ def test_atb29():
redirectios.parms['idfa_md5'] = '' redirectios.parms['idfa_md5'] = ''
redirectios.parms['ipv4'] = ip redirectios.parms['ipv4'] = ip
redirectios.parms['ua'] = ua1 redirectios.parms['ua'] = ua1
redirectios.send_request3('mURv22a', '') redirectios.send_request3('')
time.sleep(10) time.sleep(10)
receiveios.data[0]['device_info']['idfa'] = '00000000-0000-0000-0000-000000000000' receiveios.data[0]['device_info']['idfa'] = '00000000-0000-0000-0000-000000000000'
receiveios.data[0]['device_info']['idfa_md5'] = '' receiveios.data[0]['device_info']['idfa_md5'] = ''
...@@ -779,7 +779,7 @@ def test_atb30(): ...@@ -779,7 +779,7 @@ def test_atb30():
redirectios.parms['account_id'] = '456' redirectios.parms['account_id'] = '456'
redirectios.parms['idfa'] = i redirectios.parms['idfa'] = i
redirectios.parms['idfa_md5'] = computeMD5(i) redirectios.parms['idfa_md5'] = computeMD5(i)
redirectios.send_request3('mURv22a', '') redirectios.send_request3('')
time.sleep(8) time.sleep(8)
receiveios.data[0]['device_info']['idfa'] = i receiveios.data[0]['device_info']['idfa'] = i
receiveios.data[0]['device_info']['idfa_md5'] = computeMD5(i) receiveios.data[0]['device_info']['idfa_md5'] = computeMD5(i)
...@@ -809,12 +809,12 @@ def test_atb30(): ...@@ -809,12 +809,12 @@ def test_atb30():
# 归因到渠道的startup # 归因到渠道的startup
def test_atb31(): def test_atb45():
i = idfacode() i = idfacode()
v = idfvcode() v = idfvcode()
redirectios.parms['idfa'] = i redirectios.parms['idfa'] = i
redirectios.parms['idfa_md5'] = computeMD5(i) redirectios.parms['idfa_md5'] = computeMD5(i)
redirectios.send_request3('mURv22a', '') redirectios.send_request3('')
time.sleep(8) time.sleep(8)
receiveios.data[0]['device_info']['idfa'] = i receiveios.data[0]['device_info']['idfa'] = i
receiveios.data[0]['device_info']['idfa_md5'] = computeMD5(i) receiveios.data[0]['device_info']['idfa_md5'] = computeMD5(i)
...@@ -846,7 +846,7 @@ def test_atb32(): ...@@ -846,7 +846,7 @@ def test_atb32():
v = idfvcode() v = idfvcode()
redirectios.parms['idfa'] = i redirectios.parms['idfa'] = i
redirectios.parms['idfa_md5'] = computeMD5(i) redirectios.parms['idfa_md5'] = computeMD5(i)
redirectios.send_request3('mURv22a', '') redirectios.send_request3('')
time.sleep(8) time.sleep(8)
receiveios.data[0]['device_info']['idfa'] = i receiveios.data[0]['device_info']['idfa'] = i
receiveios.data[0]['device_info']['idfa_md5'] = computeMD5(i) receiveios.data[0]['device_info']['idfa_md5'] = computeMD5(i)
...@@ -878,7 +878,7 @@ def test_atb33(): ...@@ -878,7 +878,7 @@ def test_atb33():
v = idfvcode() v = idfvcode()
redirectios.parms['idfa'] = i redirectios.parms['idfa'] = i
redirectios.parms['idfa_md5'] = computeMD5(i) redirectios.parms['idfa_md5'] = computeMD5(i)
redirectios.send_request3('mURv22a', '') redirectios.send_request3('')
time.sleep(8) time.sleep(8)
receiveios.data[0]['device_info']['idfa'] = i receiveios.data[0]['device_info']['idfa'] = i
receiveios.data[0]['device_info']['idfa_md5'] = computeMD5(i) receiveios.data[0]['device_info']['idfa_md5'] = computeMD5(i)
...@@ -910,7 +910,7 @@ def test_atb34(): ...@@ -910,7 +910,7 @@ def test_atb34():
v = idfvcode() v = idfvcode()
redirectios.parms['idfa'] = i redirectios.parms['idfa'] = i
redirectios.parms['idfa_md5'] = computeMD5(i) redirectios.parms['idfa_md5'] = computeMD5(i)
redirectios.send_request3('mURv22a', '') redirectios.send_request3('')
time.sleep(8) time.sleep(8)
receiveios.data[0]['device_info']['idfa'] = i receiveios.data[0]['device_info']['idfa'] = i
receiveios.data[0]['device_info']['idfa_md5'] = computeMD5(i) receiveios.data[0]['device_info']['idfa_md5'] = computeMD5(i)
...@@ -942,8 +942,8 @@ def test_atb35(): ...@@ -942,8 +942,8 @@ def test_atb35():
v = idfvcode() v = idfvcode()
redirectios.parms['idfa'] = i redirectios.parms['idfa'] = i
redirectios.parms['idfa_md5'] = computeMD5(i) redirectios.parms['idfa_md5'] = computeMD5(i)
redirectios.send_request3('mURv22a', '') redirectios.send_request3('')
time.sleep(8) time.sleep(5)
receiveios.data[0]['device_info']['idfa'] = i receiveios.data[0]['device_info']['idfa'] = i
receiveios.data[0]['device_info']['idfa_md5'] = computeMD5(i) receiveios.data[0]['device_info']['idfa_md5'] = computeMD5(i)
receiveios.data[0]['device_info']['idfv'] = v receiveios.data[0]['device_info']['idfv'] = v
...@@ -974,7 +974,7 @@ def test_atb36(): ...@@ -974,7 +974,7 @@ def test_atb36():
v = idfvcode() v = idfvcode()
redirectios.parms['idfa'] = i redirectios.parms['idfa'] = i
redirectios.parms['idfa_md5'] = computeMD5(i) redirectios.parms['idfa_md5'] = computeMD5(i)
redirectios.send_request3('mURv22a', '') redirectios.send_request3('')
time.sleep(8) time.sleep(8)
receiveios.data[0]['device_info']['idfa'] = i receiveios.data[0]['device_info']['idfa'] = i
receiveios.data[0]['device_info']['idfa_md5'] = computeMD5(i) receiveios.data[0]['device_info']['idfa_md5'] = computeMD5(i)
...@@ -1006,7 +1006,7 @@ def test_atb37(): ...@@ -1006,7 +1006,7 @@ def test_atb37():
v = idfvcode() v = idfvcode()
redirectios.parms['idfa'] = i redirectios.parms['idfa'] = i
redirectios.parms['idfa_md5'] = computeMD5(i) redirectios.parms['idfa_md5'] = computeMD5(i)
redirectios.send_request3('mURv22a', '') redirectios.send_request3('')
time.sleep(8) time.sleep(8)
receiveios.data[0]['device_info']['idfa'] = i receiveios.data[0]['device_info']['idfa'] = i
receiveios.data[0]['device_info']['idfa_md5'] = computeMD5(i) receiveios.data[0]['device_info']['idfa_md5'] = computeMD5(i)
...@@ -1040,7 +1040,7 @@ def test_atb38(): ...@@ -1040,7 +1040,7 @@ def test_atb38():
v = idfvcode() v = idfvcode()
redirectios.parms['idfa'] = i redirectios.parms['idfa'] = i
redirectios.parms['idfa_md5'] = computeMD5(i) redirectios.parms['idfa_md5'] = computeMD5(i)
redirectios.send_request3('mUfU7va', '') redirectios.send_request3('')
time.sleep(8) time.sleep(8)
receiveios.data[0]['application_info']['appkey'] = 'b3beb14b8de6cb5b64650ff8e5983c44' receiveios.data[0]['application_info']['appkey'] = 'b3beb14b8de6cb5b64650ff8e5983c44'
receiveios.data[0]['device_info']['idfa'] = i receiveios.data[0]['device_info']['idfa'] = i
...@@ -1078,7 +1078,7 @@ def test_atb39(): ...@@ -1078,7 +1078,7 @@ def test_atb39():
redirectios.parms['callback_url'] = '' redirectios.parms['callback_url'] = ''
redirectios.parms['idfa'] = i redirectios.parms['idfa'] = i
redirectios.parms['idfa_md5'] = computeMD5(i) redirectios.parms['idfa_md5'] = computeMD5(i)
redirectios.send_request3('mURv22a', '') redirectios.send_request3('')
time.sleep(8) time.sleep(8)
receiveios.data[0]['device_info']['idfa'] = i receiveios.data[0]['device_info']['idfa'] = i
receiveios.data[0]['device_info']['idfa_md5'] = computeMD5(i) receiveios.data[0]['device_info']['idfa_md5'] = computeMD5(i)
...@@ -1105,12 +1105,13 @@ def test_atb39(): ...@@ -1105,12 +1105,13 @@ def test_atb39():
# 归因到渠道的startup,点击中的callback_url为空 # 归因到渠道的startup,点击中的callback_url为空
def test_atb39(): def test_atb40():
i = idfacode() i = idfacode()
v = idfvcode() v = idfvcode()
redirectios.parms['callback_url'] = 'https%3A%2F%2Fwww.baidu.com%2F%3Ftn%3D98010089_dg%26ch%3D16%2F'
redirectios.parms['idfa'] = i redirectios.parms['idfa'] = i
redirectios.parms['idfa_md5'] = computeMD5(i) redirectios.parms['idfa_md5'] = computeMD5(i)
redirectios.send_request3('mURv22a', '') redirectios.send_request3('')
time.sleep(8) time.sleep(8)
receiveios.data[0]['device_info']['idfa'] = i receiveios.data[0]['device_info']['idfa'] = i
receiveios.data[0]['device_info']['idfa_md5'] = computeMD5(i) receiveios.data[0]['device_info']['idfa_md5'] = computeMD5(i)
...@@ -1137,12 +1138,12 @@ def test_atb39(): ...@@ -1137,12 +1138,12 @@ def test_atb39():
# 归因到渠道的自定义事件 # 归因到渠道的自定义事件
def test_atb40(): def test_atb42():
i = idfacode() i = idfacode()
v = idfvcode() v = idfvcode()
redirectios.parms['idfa'] = i redirectios.parms['idfa'] = i
redirectios.parms['idfa_md5'] = computeMD5(i) redirectios.parms['idfa_md5'] = computeMD5(i)
redirectios.send_request3('mURv22a', '') redirectios.send_request3('')
time.sleep(8) time.sleep(8)
receiveios.data[0]['device_info']['idfa'] = i receiveios.data[0]['device_info']['idfa'] = i
receiveios.data[0]['device_info']['idfa_md5'] = computeMD5(i) receiveios.data[0]['device_info']['idfa_md5'] = computeMD5(i)
...@@ -1162,7 +1163,58 @@ def test_atb40(): ...@@ -1162,7 +1163,58 @@ def test_atb40():
receiveios.data[0]['device_info']['device_id_md5'] = computeMD5(i) receiveios.data[0]['device_info']['device_id_md5'] = computeMD5(i)
receiveios.data[0]['device_info']['device_id_type'] = 'idfa' receiveios.data[0]['device_info']['device_id_type'] = 'idfa'
receiveios.data[0]['device_info']['device_id_md5_type'] = 'idfa_md5' receiveios.data[0]['device_info']['device_id_md5_type'] = 'idfa_md5'
receiveios.data[0]["event_info"]['event_name'] = 'custom_event_101' receiveios.data[0]["event_info"]['event_name'] = 'custom_event_1'
receiveios.data[0]["event_info"]['event_type'] = 'custom' receiveios.data[0]["event_info"]['event_type'] = 'custom'
receiveios.send_request() receiveios.send_request()
print(i) print(i)
# 第一次点击的idfa与激活相同,第二次点击ip与激活相同,归因到第一次点击
def test_atb43():
ip1 = socket.inet_ntoa(struct.pack('>I', random.randint(1, 0xffffffff)))
ip2 = socket.inet_ntoa(struct.pack('>I', random.randint(1, 0xffffffff)))
i2 = idfacode()
i = idfacode()
v = idfvcode()
redirectios.parms['ipv4'] = ip1
redirectios.parms['idfa'] = i
redirectios.parms['idfa_md5'] = computeMD5(i)
redirectios.send_request3('')
time.sleep(100)
redirectios.parms['ipv4'] = ip2
redirectios.parms['idfa'] = i2
redirectios.parms['idfa_md5'] = computeMD5(i2)
redirectios.send_request3('')
time.sleep(3)
receiveios.data[0]['device_info']['ipv4'] = ip2
receiveios.data[0]['device_info']['idfa'] = i
receiveios.data[0]['device_info']['idfa_md5'] = computeMD5(i)
receiveios.data[0]['device_info']['idfv'] = v
receiveios.data[0]['device_info']['idfv_md5'] = computeMD5(v)
receiveios.data[0]['device_info']['device_id'] = i
receiveios.data[0]['device_info']['device_id_md5'] = computeMD5(i)
receiveios.data[0]['device_info']['device_id_type'] = 'idfa'
receiveios.data[0]['device_info']['device_id_md5_type'] = 'idfa_md5'
receiveios.send_request()
print(i)
#归因到渠道的激活
def test_atb44():
i = idfacode()
v = idfvcode()
redirectios.parms['idfa'] = i
redirectios.parms['idfa_md5'] = computeMD5(i)
redirectios.send_request3('')
time.sleep(3)
receiveios.data[0]['device_info']['idfa'] = i
receiveios.data[0]['device_info']['idfa_md5'] = computeMD5(i)
receiveios.data[0]['device_info']['idfv'] = v
receiveios.data[0]['device_info']['idfv_md5'] = computeMD5(v)
receiveios.data[0]['device_info']['device_id'] = i
receiveios.data[0]['device_info']['device_id_md5'] = computeMD5(i)
receiveios.data[0]['device_info']['device_id_type'] = 'idfa'
receiveios.data[0]['device_info']['device_id_md5_type'] = 'idfa_md5'
receiveios.send_request()
print(i)
\ No newline at end of file
...@@ -15,7 +15,9 @@ global data ...@@ -15,7 +15,9 @@ global data
data = [ data = [
{ {
"application_info": { "application_info": {
"appkey": "700bdf6f8e628686dc9fffccf6ebe58b", # 线上-a8ed96ae9051499fd98bc46ab9c9495c
# 测试-decbeb4d840b4bcd1a068ca7233e6ac2
"appkey": "a8ed96ae9051499fd98bc46ab9c9495c",
"bundleid": "3423232", "bundleid": "3423232",
"app_version": "1.9.0", "app_version": "1.9.0",
"channel_name": "HUAWEI" "channel_name": "HUAWEI"
...@@ -98,6 +100,22 @@ data_temp = json.dumps(data) ...@@ -98,6 +100,22 @@ data_temp = json.dumps(data)
def send_request(): def send_request():
global data global data
# url = "http://tkiomicro-receive-788931749.cn-north-1.elb.amazonaws.com.cn/receive/tkiov2/sdk"
url = "http://tkio-receive.solar-engine.com/receive/tkiov2/sdk"
# data[0]['timestamp_info']['install_time'] = int(round(time.time() * 1000))
print(data)
response = requests.request("POST", url, headers=headers, data=json.dumps(data))
print(response.text)
# 全局data
data = json.loads(data_temp)
response = json.loads(response.text)
s = str(response["status"])
response["status"] = s
return response
def send_request2():
global data
url = "http://tkiomicro-receive-788931749.cn-north-1.elb.amazonaws.com.cn/receive/tkiov2/sdk" url = "http://tkiomicro-receive-788931749.cn-north-1.elb.amazonaws.com.cn/receive/tkiov2/sdk"
data[0]['timestamp_info']['install_time'] = int(round(time.time() * 1000)) data[0]['timestamp_info']['install_time'] = int(round(time.time() * 1000))
print(data) print(data)
...@@ -113,7 +131,9 @@ def send_request(): ...@@ -113,7 +131,9 @@ def send_request():
def send_requests2s(): def send_requests2s():
global data global data
url = "http://tkiomicro-receive-788931749.cn-north-1.elb.amazonaws.com.cn/receive/tkiov2/s2s" # url = "http://tkiomicro-receive-788931749.cn-north-1.elb.amazonaws.com.cn/receive/tkiov2/s2s"
url = "http://tkio-receive.solar-engine.com/receive/tkiov2/s2s"
response = requests.request("POST", url, headers=headers, data=json.dumps(data)) response = requests.request("POST", url, headers=headers, data=json.dumps(data))
print(response.text) print(response.text)
# 全局data # 全局data
...@@ -1805,11 +1825,11 @@ def test_is_rendered3(): ...@@ -1805,11 +1825,11 @@ def test_is_rendered3():
assert response["status"] == "158" assert response["status"] == "158"
# custom_params为空 # custom_params为空,已在postman执行
def test_custom_params(): # def test_custom_params():
data[0]['event_info']['custom_params'] = '' # data[0]['event_info']['custom_params'] = ""
response = send_request() # response = send_request()
assert response["status"] == "0" # assert response["status"] == "0"
# custom_params下有特殊字符(key限制数字、大小写字符、下划线) # custom_params下有特殊字符(key限制数字、大小写字符、下划线)
...@@ -1867,14 +1887,14 @@ def test_custom_params3(): ...@@ -1867,14 +1887,14 @@ def test_custom_params3():
assert response["status"] == "0" assert response["status"] == "0"
def test_pl(): # def test_pl():
for index in range(1000): # for index in range(1000):
newlist = ['install', 'startup', 'register', 'login', 'order', 'purchase', 'adclick'] # newlist = ['install', 'startup', 'register', 'login', 'order', 'purchase', 'adclick']
for event in newlist: # for event in newlist:
data[0]["event_info"]['event_data']['ad_price_currency_type'] = 'CNY' # data[0]["event_info"]['event_data']['ad_price_currency_type'] = 'CNY'
data[0]['event_info']['event_name'] = event # data[0]['event_info']['event_name'] = event
response = send_request() # response = send_request()
assert response["status"] == "0" # assert response["status"] == "0"
......
...@@ -3,7 +3,8 @@ import json ...@@ -3,7 +3,8 @@ import json
import pytest import pytest
import time import time
url = "http://tkiomicro-receive-788931749.cn-north-1.elb.amazonaws.com.cn/receive/tkiov2/sdk" # url = "http://tkiomicro-receive-788931749.cn-north-1.elb.amazonaws.com.cn/receive/tkiov2/sdk"
chaochang = '543214223221321321312131313133132131232131232132132543214223221321321312131313133132131232131232132132543214223221321321312131313133132131232131232132132' chaochang = '543214223221321321312131313133132131232131232132132543214223221321321312131313133132131232131232132132543214223221321321312131313133132131232131232132132'
headers = { headers = {
...@@ -14,7 +15,9 @@ global data ...@@ -14,7 +15,9 @@ global data
data = [ data = [
{ {
"application_info": { "application_info": {
"appkey": "22e7d9a67fd54ecb5b298ab7fbb1fb7c", # 线上-55705dbd45dd246751b87bba94b8c73c
# 测试-678ca51be65b91dfdd86293af9cfbe31
"appkey": "55705dbd45dd246751b87bba94b8c73c",
"bundleid": "3423232", "bundleid": "3423232",
"app_version": "1.9.0", "app_version": "1.9.0",
"channel_name": "default" "channel_name": "default"
...@@ -84,10 +87,14 @@ data_temp = json.dumps(data) ...@@ -84,10 +87,14 @@ data_temp = json.dumps(data)
def send_request(): def send_request():
global data global data
url = "http://tkiomicro-receive-788931749.cn-north-1.elb.amazonaws.com.cn/receive/tkiov2/sdk" # 测试
# url = "http://tkiomicro-receive-788931749.cn-north-1.elb.amazonaws.com.cn/receive/tkiov2/sdk"
# 线上
url = "http://tkio-receive.solar-engine.com/receive/tkiov2/sdk"
data[0]['timestamp_info']['install_time'] = int(round(time.time() * 1000)) data[0]['timestamp_info']['install_time'] = int(round(time.time() * 1000))
data[0]['timestamp_info']['current_event_time'] = int(round(time.time() * 1000)) data[0]['timestamp_info']['current_event_time'] = int(round(time.time() * 1000))
# print(data) print(data)
response = requests.request("POST", url, headers=headers, data=json.dumps(data)) response = requests.request("POST", url, headers=headers, data=json.dumps(data))
print(response.text) print(response.text)
# 全局data # 全局data
...@@ -101,6 +108,8 @@ def send_request(): ...@@ -101,6 +108,8 @@ def send_request():
def send_request2(): def send_request2():
global data global data
url = "http://tkiomicro-receive-788931749.cn-north-1.elb.amazonaws.com.cn/receive/tkiov2/s2s" url = "http://tkiomicro-receive-788931749.cn-north-1.elb.amazonaws.com.cn/receive/tkiov2/s2s"
# 线上
url = "http://tkio-receive.solar-engine.com/receive/tkiov2/s2s"
data[0]['timestamp_info']['install_time'] = int(round(time.time() * 1000)) data[0]['timestamp_info']['install_time'] = int(round(time.time() * 1000))
data[0]['timestamp_info']['current_event_time'] = int(round(time.time() * 1000)) data[0]['timestamp_info']['current_event_time'] = int(round(time.time() * 1000))
# print(data) # print(data)
......
...@@ -104,7 +104,7 @@ parms = { ...@@ -104,7 +104,7 @@ parms = {
} }
data_temp = json.dumps(parms) data_temp = json.dumps(parms)
# 有短链及参数要求的用该方法
def send_request(dl, cs): def send_request(dl, cs):
global parms global parms
url1 = 'http://tmtest.trackingio.com/receive/turl/' + dl + cs url1 = 'http://tmtest.trackingio.com/receive/turl/' + dl + cs
...@@ -115,18 +115,19 @@ def send_request(dl, cs): ...@@ -115,18 +115,19 @@ def send_request(dl, cs):
response = json.loads(response.text) response = json.loads(response.text)
return response return response
# 302跳转时用该方法
def send_request2(dl, cs): def send_request2():
url1 = 'http://tmtest.trackingio.com/receive/turl/' + dl + cs url1 = 'http://tmtest.trackingio.com/receive/turl/Nja2aaa'
parms['ts'] = int(round(time.time() * 1000)) # parms['ts'] = int(round(time.time() * 1000))
response = requests.get(url=url1, params=parms, timeout=10, verify=False) response = requests.get(url=url1, params=parms, timeout=10, verify=False)
print(response.url) print(response.url)
# response = json.loads(response.text) # response = json.loads(response.text)
return response return response
def send_request3(dl, cs): # 测试归因用的方法,与其他方法区别在于ts为当前时间
def send_request3(cs):
global parms global parms
url1 = 'http://tmtest.trackingio.com/receive/turl/' + dl + cs url1 = 'http://tmtest.trackingio.com/receive/turl/fQvuUba' + cs
parms['ts'] = int(round(time.time() * 1000)) parms['ts'] = int(round(time.time() * 1000))
response = requests.get(url=url1, params=parms, timeout=10, verify=False) response = requests.get(url=url1, params=parms, timeout=10, verify=False)
print(response.url) print(response.url)
...@@ -135,6 +136,21 @@ def send_request3(dl, cs): ...@@ -135,6 +136,21 @@ def send_request3(dl, cs):
response = json.loads(response.text) response = json.loads(response.text)
return response return response
# 没有短链及参数要求的用该方法,测试环境默认参数为2586渠道短链
# appeky:0dd83bd5079ab3b20d9e66ebb195f6c4
def send_request4():
global parms
url1 = 'http://tmtest.trackingio.com/receive/turl/zMFjQva'
response = requests.get(url=url1, params=parms, timeout=10, verify=False)
print(response.url)
print(response.text)
parms = json.loads(data_temp)
response = json.loads(response.text)
return response
# 短链错误 # 短链错误
def test_dl(): def test_dl():
re = send_request('33322', '') re = send_request('33322', '')
...@@ -144,137 +160,142 @@ def test_dl(): ...@@ -144,137 +160,142 @@ def test_dl():
# 触点传参时间为正常 # 触点传参时间为正常
def test_ts9(): def test_ts9():
parms['ts'] = current_time_13 parms['ts'] = current_time_13
re = send_request('Yzuiuma', '') re = send_request4()
assert re["status"] == 0 assert re["status"] == 0
# 触点传参时间超过13字符 # 触点传参时间超过13字符
def test_ts8(): def test_ts8():
parms['ts'] = '16462909436611321' parms['ts'] = '16462909436611321'
re = send_request('Yzuiuma', '') re = send_request4()
assert re["status"] == 167 assert re["status"] == 167
# 触点传参时间等于13字符,但是包含特殊字符 # 触点传参时间等于13字符,但是包含特殊字符
def test_ts7(): def test_ts7():
parms['ts'] = '1@46290943661' parms['ts'] = '1@46290943661'
re = send_request('Yzuiuma', '') re = send_request4()
assert re["status"] == 167 assert re["status"] == 167
# 触点传参时间等于13字符,但是包含汉子 # 触点传参时间等于13字符,但是包含汉子
def test_ts0(): def test_ts0():
parms['ts'] = '1测4690943661' parms['ts'] = '1测4690943661'
re = send_request('Yzuiuma', '') re = send_request4()
assert re["status"] == 167 assert re["status"] == 167
# iss2s=1,ts为空 # iss2s=1,ts为空
def test_ts6(): def test_ts6():
parms['ts'] = "" parms['ts'] = ""
parms['is_s2s'] = "1" parms['is_s2s'] = "1"
re = send_request('Yzuiuma', '') re = send_request4()
assert re["status"] == 167 assert re["status"] == 167
# iss2s=0,ts为空,跳转至监测链接的landing_page_url地址 # iss2s=0,ts为空,跳转至监测链接的landing_page_url地址
# 短链有地址时跳转至短链地址,短链无地址时,跳转至app地址
def test_ts5(): def test_ts5():
parms['ts'] = "" parms['ts'] = ""
parms['is_s2s'] = "0" parms['is_s2s'] = "0"
send_request2('Yzuiuma', '') send_request2()
# is_s2s为空,默认为0状态,跳转至监测链接的landing_page_url地址 # is_s2s为空,默认为0状态,跳转至监测链接的landing_page_url地址
def test_is_s2s1(): def test_is_s2s1():
parms['is_s2s'] = "" parms['is_s2s'] = ""
send_request2('Yzuiuma', '') send_request2()
# is_s2s非0或者1 # is_s2s非0或者1
def test_is_s2s1(): def test_is_s2s2():
parms['is_s2s'] = "2" parms['is_s2s'] = "2"
re = send_request('Yzuiuma', '') re = send_request4()
assert re["status"] == 165 assert re["status"] == 165
# 触点类型不为click # 触点类型不为click
def test_touchpoint_type1(): def test_touchpoint_type1():
parms['touchpoint_type'] = 'aaa' parms['touchpoint_type'] = 'aaa'
re = send_request('Yzuiuma', '') re = send_request4()
assert re["status"] == 163 assert re["status"] == 163
# 触点类型为空 # 触点类型为空
def test_touchpoint_type2(): def test_touchpoint_type2():
parms['touchpoint_type'] = '' parms['touchpoint_type'] = ''
re = send_request('Yzuiuma', '') re = send_request4()
assert re["status"] == 163 assert re["status"] == 163
# 归因类型为空 # 归因类型为空
def test_attribution_type1(): def test_attribution_type1():
parms['attribution_type'] = '' parms['attribution_type'] = ''
re = send_request('Yzuiuma', '') re = send_request4()
assert re["status"] == 164 assert re["status"] == 164
# 归因类型为非ua # 归因类型为非ua
def test_attribution_type2(): def test_attribution_type2():
parms['attribution_type'] = 'test' parms['attribution_type'] = 'test'
re = send_request('Yzuiuma', '') re = send_request4()
assert re["status"] == 164 assert re["status"] == 164
# 操作系统为空 # 操作系统为空
def test_os1(): def test_os1():
parms['os'] = '' parms['os'] = ''
re = send_request('Yzuiuma', '') re = send_request4()
assert re["status"] == 0 assert re["status"] == 0
# 操作系统超过16个字符 # 操作系统超过16个字符
def test_os1(): def test_os2():
parms['os'] = zf35 parms['os'] = zf35
re = send_request('Yzuiuma', '') re = send_request4()
assert re["status"] == 115 assert re["status"] == 115
# 操作系统正常 # 操作系统正常
def test_os1(): def test_os3():
parms['os'] = 'iOS' parms['os'] = 'iOS'
re = send_request('Yzuiuma', '') re = send_request4()
assert re["status"] == 0 assert re["status"] == 0
# 操作系统包含特殊字符 # 操作系统包含特殊字符
def test_os2(): def test_os4():
parms['os'] = 'iOS#¥' parms['os'] = 'iOS#¥'
re = send_request('Yzuiuma', '') re = send_request4()
assert re["status"] == 0 assert re["status"] == 0
# 操作系统正常 # 操作系统正常
def test_os3(): def test_os5():
parms['os'] = 'android' parms['os'] = 'android'
re = send_request('Yzuiuma', '') re = send_request4()
assert re["status"] == 0 assert re["status"] == 0
# 设备型号为空 # 设备型号为空
def test_model1(): def test_model1():
parms['model'] = '' parms['model'] = ''
re = send_request('Yzuiuma', '') re = send_request4()
assert re["status"] == 0 assert re["status"] == 0
# 设备型号超过64字符 # 设备型号超过64字符
def test_model2(): def test_model2():
parms['model'] = zf130 parms['model'] = zf130
re = send_request('Yzuiuma', '') re = send_request4()
assert re["status"] == 118 assert re["status"] == 118
# 设备型号=64字符 # 设备型号=64字符
def test_model3(): def test_model3():
parms['model'] = zf64 parms['model'] = zf64
re = send_request('Yzuiuma', '') re = send_request4()
assert re["status"] == 0 assert re["status"] == 0
...@@ -282,7 +303,7 @@ def test_model3(): ...@@ -282,7 +303,7 @@ def test_model3():
def test_ipv41(): def test_ipv41():
parms['model'] = zf64 parms['model'] = zf64
parms['is_s2s'] = '1' parms['is_s2s'] = '1'
re = send_request('Yzuiuma', '') re = send_request4()
assert re["status"] == 0 assert re["status"] == 0
...@@ -290,14 +311,14 @@ def test_ipv41(): ...@@ -290,14 +311,14 @@ def test_ipv41():
def test_ipv42(): def test_ipv42():
parms['ipv4'] = "" parms['ipv4'] = ""
parms['is_s2s'] = '1' parms['is_s2s'] = '1'
re = send_request('Yzuiuma', '') re = send_request4()
assert re["status"] == 119 assert re["status"] == 119
# 用户公网IP v4版本超过15字符 # 用户公网IP v4版本超过15字符
def test_ipv43(): def test_ipv43():
parms['ipv4'] = zf35 parms['ipv4'] = zf35
re = send_request('Yzuiuma', '') re = send_request4()
assert re["status"] == 119 assert re["status"] == 119
...@@ -305,33 +326,35 @@ def test_ipv43(): ...@@ -305,33 +326,35 @@ def test_ipv43():
def test_ipv44(): def test_ipv44():
parms['ipv4'] = "" parms['ipv4'] = ""
parms['is_s2s'] = '0' parms['is_s2s'] = '0'
send_request2('Yzuiuma', '') send_request2()
# 用户公网IP v4版本不为空,is_s2s为0,取传的ip值 # 用户公网IP v4版本不为空,is_s2s为0,取传的ip值
def test_ipv45(): def test_ipv45():
parms['ipv4'] = "2.34.34.34" parms['ipv4'] = "2.34.34.34"
parms['is_s2s'] = '0' parms['is_s2s'] = '0'
send_request2('Yzuiuma', '') send_request2()
# 用户公网ipv6版本超过128字符 # 用户公网ipv6版本超过128字符
def test_ipv61(): def test_ipv61():
parms['ipv6'] = zf468 parms['ipv6'] = zf468
re = send_request('Yzuiuma', '') re = send_request4()
assert re["status"] == 120 assert re["status"] == 120
# 用户公网ipv6版本为空 # 用户公网ipv6版本为空
def test_ipv62(): def test_ipv62():
parms['ipv6'] = "" parms['ipv6'] = ""
re = send_request('Yzuiuma', '') re = send_request4()
assert re["status"] == 0 assert re["status"] == 0
# 用户公网ipv6版本为空 # 用户公网ipv6版本为空
def test_ipv62(): def test_ipv63():
parms['ipv6'] = "" parms['ipv6'] = ""
re = send_request('Yzuiuma', '') re = send_request4()
assert re["status"] == 0 assert re["status"] == 0
...@@ -339,7 +362,7 @@ def test_ipv62(): ...@@ -339,7 +362,7 @@ def test_ipv62():
def test_ua1(): def test_ua1():
parms['ua'] = "" parms['ua'] = ""
parms['is_s2s'] = '1' parms['is_s2s'] = '1'
re = send_request('Yzuiuma', '') re = send_request4()
assert re["status"] == 121 assert re["status"] == 121
...@@ -347,303 +370,303 @@ def test_ua1(): ...@@ -347,303 +370,303 @@ def test_ua1():
def test_ua2(): def test_ua2():
parms['ua'] = zf668 parms['ua'] = zf668
parms['is_s2s'] = '1' parms['is_s2s'] = '1'
re = send_request('Yzuiuma', '') re = send_request4()
assert re["status"] == 121 assert re["status"] == 121
# 用户代理信息为空,is_s2s=0 # 用户代理信息为空,is_s2s=0
def test_ua2(): def test_ua3():
parms['ua'] = '' parms['ua'] = ''
parms['is_s2s'] = '0' parms['is_s2s'] = '0'
send_request2('Yzuiuma', '') send_request2()
# OAID超过512字符 # OAID超过512字符
def test_oaid1(): def test_oaid1():
parms['oaid'] = zf668 parms['oaid'] = zf668
re = send_request('Yzuiuma', '') re = send_request4()
assert re["status"] == 126 assert re["status"] == 126
# OAID为空 # OAID为空
def test_oaid2(): def test_oaid2():
parms['oaid'] = '' parms['oaid'] = ''
re = send_request('Yzuiuma', '') re = send_request4()
assert re["status"] == 0 assert re["status"] == 0
# OAID小于512 # OAID小于512
def test_oaid3(): def test_oaid3():
parms['oaid'] = '3DEA635F-B24F-434B-833F-4ED028FEAEEF' parms['oaid'] = '3DEA635F-B24F-434B-833F-4ED028FEAEEF'
re = send_request('Yzuiuma', '') re = send_request4()
assert re["status"] == 0 assert re["status"] == 0
# oaid_md5超过32字符 # oaid_md5超过32字符
def test_oaid_md51(): def test_oaid_md51():
parms['oaid_md5'] = zf35 parms['oaid_md5'] = zf35
re = send_request('Yzuiuma', '') re = send_request4()
assert re["status"] == 127 assert re["status"] == 127
# oaid_md5为空 # oaid_md5为空
def test_oaid_md52(): def test_oaid_md52():
parms['oaid_md5'] = '' parms['oaid_md5'] = ''
re = send_request('Yzuiuma', '') re = send_request4()
assert re["status"] == 0 assert re["status"] == 0
# oaid_md5为32字符 # oaid_md5为32字符
def test_oaid_md53(): def test_oaid_md53():
parms['oaid_md5'] = '8e488a40a17aed2f6752f51382a4eafc' parms['oaid_md5'] = '8e488a40a17aed2f6752f51382a4eafc'
re = send_request('Yzuiuma', '') re = send_request4()
assert re["status"] == 0 assert re["status"] == 0
# 各个设备的md5为32字符,大写 # 各个设备的md5为32字符,大写
def test_oaid_md53(): def test_oaid_md54():
newlist = ['oaid_md5', 'imei1_md5', 'imei2_md5', 'gaid_md5', 'mac_md5', 'android_id_md5'] newlist = ['oaid_md5', 'imei1_md5', 'imei2_md5', 'gaid_md5', 'mac_md5', 'android_id_md5']
for shebei_md5 in newlist: for shebei_md5 in newlist:
parms[shebei_md5] = '8E488A40A17AED2F6752F51382A4EAFC' parms[shebei_md5] = '8E488A40A17AED2F6752F51382A4EAFC'
re = send_request('Yzuiuma', '') re = send_request4()
assert re["status"] == 0 assert re["status"] == 0
# imei1超过32字符 # imei1超过32字符
def test_imei11(): def test_imei11():
parms['imei1'] = zf35 parms['imei1'] = zf35
re = send_request('Yzuiuma', '') re = send_request4()
assert re["status"] == 128 assert re["status"] == 128
# imei1为空 # imei1为空
def test_imei12(): def test_imei12():
parms['imei1'] = '' parms['imei1'] = ''
re = send_request('Yzuiuma', '') re = send_request4()
assert re["status"] == 0 assert re["status"] == 0
# imei1为正常 # imei1为正常
def test_imei13(): def test_imei13():
parms['imei1'] = '8342732742383' parms['imei1'] = '8342732742383'
re = send_request('Yzuiuma', '') re = send_request4()
assert re["status"] == 0 assert re["status"] == 0
# imei1_md5非32字符 # imei1_md5非32字符
def test_imei1_md51(): def test_imei1_md51():
parms['imei1_md5'] = zf35 parms['imei1_md5'] = zf35
re = send_request('Yzuiuma', '') re = send_request4()
assert re["status"] == 129 assert re["status"] == 129
# imei1_md5为32字符 # imei1_md5为32字符
def test_imei1_md53(): def test_imei1_md53():
parms['imei1_md5'] = '8e488a40a17aed2f6752f51382a4eafc' parms['imei1_md5'] = '8e488a40a17aed2f6752f51382a4eafc'
re = send_request('Yzuiuma', '') re = send_request4()
assert re["status"] == 0 assert re["status"] == 0
# imei1_md5为空 # imei1_md5为空
def test_imei1_md52(): def test_imei1_md52():
parms['imei1_md5'] = '' parms['imei1_md5'] = ''
re = send_request('Yzuiuma', '') re = send_request4()
assert re["status"] == 0 assert re["status"] == 0
# imei2超过32字符 # imei2超过32字符
def test_imei21(): def test_imei21():
parms['imei2'] = zf35 parms['imei2'] = zf35
re = send_request('Yzuiuma', '') re = send_request4()
assert re["status"] == 130 assert re["status"] == 130
# imei2为空 # imei2为空
def test_imei22(): def test_imei22():
parms['imei2'] = '' parms['imei2'] = ''
re = send_request('Yzuiuma', '') re = send_request4()
assert re["status"] == 0 assert re["status"] == 0
# imei2为32字符内 # imei2为32字符内
def test_imei23(): def test_imei23():
parms['imei2'] = '8342732742383' parms['imei2'] = '8342732742383'
re = send_request('Yzuiuma', '') re = send_request4()
assert re["status"] == 0 assert re["status"] == 0
# imei2_md5非32字符 # imei2_md5非32字符
def test_imei2_md51(): def test_imei2_md51():
parms['imei2_md5'] = zf35 parms['imei2_md5'] = zf35
re = send_request('Yzuiuma', '') re = send_request4()
assert re["status"] == 131 assert re["status"] == 131
# imei2_md5为空 # imei2_md5为空
def test_imei2_md52(): def test_imei2_md52():
parms['imei2_md5'] = '' parms['imei2_md5'] = ''
re = send_request('Yzuiuma', '') re = send_request4()
assert re["status"] == 0 assert re["status"] == 0
# imei2_md5为32字符 # imei2_md5为32字符
def test_imei2_md53(): def test_imei2_md53():
parms['imei2_md5'] = '8e488a40a17aed2f6752f51382a4eafc' parms['imei2_md5'] = '8e488a40a17aed2f6752f51382a4eafc'
re = send_request('Yzuiuma', '') re = send_request4()
assert re["status"] == 0 assert re["status"] == 0
# gaid非36字符 # gaid非36字符
def test_gaid1(): def test_gaid1():
parms['gaid'] = zf35 parms['gaid'] = zf35
re = send_request('Yzuiuma', '') re = send_request4()
assert re["status"] == 132 assert re["status"] == 132
# gaid为空 # gaid为空
def test_gaid2(): def test_gaid2():
parms['gaid'] = '' parms['gaid'] = ''
re = send_request('Yzuiuma', '') re = send_request4()
assert re["status"] == 0 assert re["status"] == 0
# gaid为36字符 # gaid为36字符
def test_gaid3(): def test_gaid3():
parms['gaid'] = 'B21C5EC5-9921-42FD-AAC5-07A0EB6CF1A0' parms['gaid'] = 'B21C5EC5-9921-42FD-AAC5-07A0EB6CF1A0'
re = send_request('Yzuiuma', '') re = send_request4()
assert re["status"] == 0 assert re["status"] == 0
# gaid_md5非32字符 # gaid_md5非32字符
def test_gaid_md51(): def test_gaid_md51():
parms['gaid_md5'] = zf35 parms['gaid_md5'] = zf35
re = send_request('Yzuiuma', '') re = send_request4()
assert re["status"] == 133 assert re["status"] == 133
# gaid_md5为空 # gaid_md5为空
def test_gaid_md52(): def test_gaid_md52():
parms['gaid_md5'] = '' parms['gaid_md5'] = ''
re = send_request('Yzuiuma', '') re = send_request4()
assert re["status"] == 0 assert re["status"] == 0
# gaid_md5为32 字符 # gaid_md5为32 字符
def test_gaid_md53(): def test_gaid_md53():
parms['gaid_md5'] = '8e488a40a17aed2f6752f51382a4eafc' parms['gaid_md5'] = '8e488a40a17aed2f6752f51382a4eafc'
re = send_request('Yzuiuma', '') re = send_request4()
assert re["status"] == 0 assert re["status"] == 0
# mac非17个字符 # mac非17个字符
def test_mac1(): def test_mac1():
parms['mac'] = "111111" parms['mac'] = "111111"
re = send_request('Yzuiuma', '') re = send_request4()
assert re["status"] == 134 assert re["status"] == 134
# mac为空 # mac为空
def test_mac2(): def test_mac2():
parms['mac'] = "" parms['mac'] = ""
re = send_request('Yzuiuma', '') re = send_request4()
assert re["status"] == 0 assert re["status"] == 0
# mac为17字符 # mac为17字符
def test_mac3(): def test_mac3():
parms['mac'] = "08:00:20:0A:8C:6D" parms['mac'] = "08:00:20:0A:8C:6D"
re = send_request('Yzuiuma', '') re = send_request4()
assert re["status"] == 0 assert re["status"] == 0
# mac_md5非32字符 # mac_md5非32字符
def test_mac_md51(): def test_mac_md51():
parms['mac_md5'] = zf35 parms['mac_md5'] = zf35
re = send_request('Yzuiuma', '') re = send_request4()
assert re["status"] == 135 assert re["status"] == 135
# mac_md5为空 # mac_md5为空
def test_mac_md52(): def test_mac_md52():
parms['gaid_md5'] = '' parms['gaid_md5'] = ''
re = send_request('Yzuiuma', '') re = send_request4()
assert re["status"] == 0 assert re["status"] == 0
# mac_md5 32字符 # mac_md5 32字符
def test_mac_md53(): def test_mac_md53():
parms['gaid_md5'] = '8e488a40a17aed2f6752f51382a4eafc' parms['gaid_md5'] = '8e488a40a17aed2f6752f51382a4eafc'
re = send_request('Yzuiuma', '') re = send_request4()
assert re["status"] == 0 assert re["status"] == 0
# android_id非16字符 # android_id非16字符
def test_android_id1(): def test_android_id1():
parms['android_id'] = zf35 parms['android_id'] = zf35
re = send_request('Yzuiuma', '') re = send_request4()
assert re["status"] == 136 assert re["status"] == 136
# android_id为空 # android_id为空
def test_android_id2(): def test_android_id2():
parms['android_id'] = '' parms['android_id'] = ''
re = send_request('Yzuiuma', '') re = send_request4()
assert re["status"] == 0 assert re["status"] == 0
# android_id为16字符 # android_id为16字符
def test_android_id3(): def test_android_id3():
parms['android_id'] = '1a34fc556a43c453' parms['android_id'] = '1a34fc556a43c453'
re = send_request('Yzuiuma', '') re = send_request4()
assert re["status"] == 0 assert re["status"] == 0
# android_id_md5非32字符 # android_id_md5非32字符
def test_android_id_md51(): def test_android_id_md51():
parms['android_id_md5'] = zf35 parms['android_id_md5'] = zf35
re = send_request('Yzuiuma', '') re = send_request4()
assert re["status"] == 189 assert re["status"] == 189
# android_id_md5为空 # android_id_md5为空
def test_android_id_md52(): def test_android_id_md52():
parms['android_id_md5'] = '' parms['android_id_md5'] = ''
re = send_request('Yzuiuma', '') re = send_request4()
assert re["status"] == 0 assert re["status"] == 0
# android_id_md5为32字符 # android_id_md5为32字符
def test_android_id_md53(): def test_android_id_md53():
parms['android_id_md5'] = '8e488a40a17aed2f6752f51382a4eafc' parms['android_id_md5'] = '8e488a40a17aed2f6752f51382a4eafc'
re = send_request('Yzuiuma', '') re = send_request4()
assert re["status"] == 0 assert re["status"] == 0
# 短链是安卓,传idfa # 短链是安卓,传idfa
def test_idfa1(): def test_idfa1():
parms['idfa'] = '3DEA635F-B24F-434B-833F-4ED028FEAEEF' parms['idfa'] = '3DEA635F-B24F-434B-833F-4ED028FEAEEF'
re = send_request('Yzuiuma', '') re = send_request4()
assert re["status"] == 115 assert re["status"] == 115
# 短链是安卓,传idfa_md5 # 短链是安卓,传idfa_md5
def test_idfa_md51(): def test_idfa_md51():
parms['idfa_md5'] = '8e488a40a17aed2f6752f51382a4eafc' parms['idfa_md5'] = '8e488a40a17aed2f6752f51382a4eafc'
re = send_request('Yzuiuma', '') re = send_request4()
assert re["status"] == 115 assert re["status"] == 115
# 短链是安卓,传idfv # 短链是安卓,传idfv
def test_idfv1(): def test_idfv1():
parms['idfv'] = '3DEA635F-B24F-434B-833F-4ED028FEAEEF' parms['idfv'] = '3DEA635F-B24F-434B-833F-4ED028FEAEEF'
re = send_request('Yzuiuma', '') re = send_request4()
assert re["status"] == 115 assert re["status"] == 115
# 短链是安卓,传idfv_md5 # 短链是安卓,传idfv_md5
def test_idfv_md51(): def test_idfv_md51():
parms['idfv_md5'] = '8e488a40a17aed2f6752f51382a4eafc' parms['idfv_md5'] = '8e488a40a17aed2f6752f51382a4eafc'
re = send_request('Yzuiuma', '') re = send_request4()
assert re["status"] == 115 assert re["status"] == 115
...@@ -661,7 +684,7 @@ def test_empty(): ...@@ -661,7 +684,7 @@ def test_empty():
parms['mac1_md5'] = '' parms['mac1_md5'] = ''
parms['gaid_md5'] = '' parms['gaid_md5'] = ''
parms['gaid'] = '' parms['gaid'] = ''
re = send_request('Yzuiuma', '') re = send_request4()
assert re["status"] == 0 assert re["status"] == 0
...@@ -672,7 +695,7 @@ def test_ads_data1(): ...@@ -672,7 +695,7 @@ def test_ads_data1():
'click_id', 'impression_id', 'request_id', 'callback_id', 'callback_url'] 'click_id', 'impression_id', 'request_id', 'callback_id', 'callback_url']
for ads_data in newlist: for ads_data in newlist:
parms[ads_data] = '' parms[ads_data] = ''
re = send_request('Yzuiuma', '') re = send_request4()
assert re["status"] == 0 assert re["status"] == 0
...@@ -683,12 +706,12 @@ def test_ads_data2(): ...@@ -683,12 +706,12 @@ def test_ads_data2():
'click_id', 'impression_id', 'request_id'] 'click_id', 'impression_id', 'request_id']
for ads_data in newlist: for ads_data in newlist:
parms[ads_data] = zf64 parms[ads_data] = zf64
re = send_request('Yzuiuma', '') re = send_request4()
assert re["status"] == 0 assert re["status"] == 0
# 广告账户id,广告组id,广告计划id,广告位id,转化id,广告点击id,广告展示id,广告请求id超过64字符 # 广告账户id,广告组id,广告计划id,广告位id,转化id,广告点击id,广告展示id,广告请求id超过64字符
def test_ads_data2(): def test_ads_data3():
newlist = [{'name': 'account_id', 'status': 168}, newlist = [{'name': 'account_id', 'status': 168},
{'name': 'adgroup_id', 'status': 169}, {'name': 'adgroup_id', 'status': 169},
{'name': 'adplan_id', 'status': 171}, {'name': 'adplan_id', 'status': 171},
...@@ -700,12 +723,12 @@ def test_ads_data2(): ...@@ -700,12 +723,12 @@ def test_ads_data2():
] ]
for ads_data in newlist: for ads_data in newlist:
parms[ads_data['name']] = zf130 parms[ads_data['name']] = zf130
re = send_request('Yzuiuma', '') re = send_request4()
assert re["status"] == ads_data['status'] assert re["status"] == ads_data['status']
# 广告组名称,广告计划名称,广告创意名称,渠道回调id,渠道回调地址超过256字符 # 广告组名称,广告计划名称,广告创意名称,渠道回调id,渠道回调地址超过256字符
def test_ads_data3(): def test_ads_data4():
newlist = [{'name': 'adgroup_name', 'status': 170}, newlist = [{'name': 'adgroup_name', 'status': 170},
{'name': 'adplan_name', 'status': 172}, {'name': 'adplan_name', 'status': 172},
{'name': 'adcreative_name', 'status': 174}, {'name': 'adcreative_name', 'status': 174},
...@@ -714,12 +737,12 @@ def test_ads_data3(): ...@@ -714,12 +737,12 @@ def test_ads_data3():
] ]
for ads_data in newlist: for ads_data in newlist:
parms[ads_data['name']] = zf468 parms[ads_data['name']] = zf468
re = send_request('Yzuiuma', '') re = send_request4()
assert re["status"] == ads_data['status'] assert re["status"] == ads_data['status']
# 广告组名称,广告计划名称,广告创意名称,渠道回调id,渠道回调地址等于256字符 # 广告组名称,广告计划名称,广告创意名称,渠道回调id,渠道回调地址等于256字符
def test_ads_data4(): def test_ads_data5():
newlist = [{'name': 'adgroup_name', 'status': 0}, newlist = [{'name': 'adgroup_name', 'status': 0},
{'name': 'adplan_name', 'status': 0}, {'name': 'adplan_name', 'status': 0},
{'name': 'adcreative_name', 'status': 0}, {'name': 'adcreative_name', 'status': 0},
...@@ -728,12 +751,12 @@ def test_ads_data4(): ...@@ -728,12 +751,12 @@ def test_ads_data4():
] ]
for ads_data in newlist: for ads_data in newlist:
parms[ads_data['name']] = zf256 parms[ads_data['name']] = zf256
re = send_request('Yzuiuma', '') re = send_request4()
assert re["status"] == ads_data['status'] assert re["status"] == ads_data['status']
# 广告组名称,广告计划名称,广告创意名称,渠道回调id,渠道回调地址小于256字符且包含特殊字符 # 广告组名称,广告计划名称,广告创意名称,渠道回调id,渠道回调地址小于256字符且包含特殊字符
def test_ads_data5(): def test_ads_data6():
newlist = [{'name': 'adgroup_name', 'status': 0}, newlist = [{'name': 'adgroup_name', 'status': 0},
{'name': 'adplan_name', 'status': 0}, {'name': 'adplan_name', 'status': 0},
{'name': 'adcreative_name', 'status': 0}, {'name': 'adcreative_name', 'status': 0},
...@@ -742,62 +765,62 @@ def test_ads_data5(): ...@@ -742,62 +765,62 @@ def test_ads_data5():
] ]
for ads_data in newlist: for ads_data in newlist:
parms[ads_data['name']] = '测试*test' parms[ads_data['name']] = '测试*test'
re = send_request('Yzuiuma', '') re = send_request4()
assert re["status"] == ads_data['status'] assert re["status"] == ads_data['status']
# 广告创意id,流量媒体名称超过128字符 # 广告创意id,流量媒体名称超过128字符
def test_ads_data6(): def test_ads_data7():
newlist = [{'name': 'adcreative_id', 'status': 0}, newlist = [{'name': 'adcreative_id', 'status': 0},
{'name': 'site_name', 'status': 0}, {'name': 'site_name', 'status': 0},
] ]
for ads_data in newlist: for ads_data in newlist:
parms[ads_data['name']] = zf130 parms[ads_data['name']] = zf130
re = send_request('Yzuiuma', '') re = send_request4()
assert re["status"] == ads_data['status'] assert re["status"] == ads_data['status']
# 广告创意id,流量媒体名称等于128字符 # 广告创意id,流量媒体名称等于128字符
def test_ads_data7(): def test_ads_data8():
newlist = [{'name': 'adcreative_id', 'status': 0}, newlist = [{'name': 'adcreative_id', 'status': 0},
{'name': 'site_name', 'status': 0}, {'name': 'site_name', 'status': 0},
] ]
for ads_data in newlist: for ads_data in newlist:
parms[ads_data['name']] = zf128 parms[ads_data['name']] = zf128
re = send_request('Yzuiuma', '') re = send_request4()
assert re["status"] == ads_data['status'] assert re["status"] == ads_data['status']
# 创意类型,广告类型,流量媒体id超过32字符 # 创意类型,广告类型,流量媒体id超过32字符
def test_ads_data8(): def test_ads_data9():
newlist = [{'name': 'adcreative_type', 'status': 175}, newlist = [{'name': 'adcreative_type', 'status': 175},
{'name': 'site_id', 'status': 176}, {'name': 'site_id', 'status': 176},
{'name': 'ad_type', 'status': 178}, {'name': 'ad_type', 'status': 178},
] ]
for ads_data in newlist: for ads_data in newlist:
parms[ads_data['name']] = zf35 parms[ads_data['name']] = zf35
re = send_request('Yzuiuma', '') re = send_request4()
assert re["status"] == ads_data['status'] assert re["status"] == ads_data['status']
# 创意类型为16字符 # 创意类型为16字符
def test_ads_data9(): def test_ads_data10():
parms['adcreative_type'] = '大图大图大图大图' parms['adcreative_type'] = '大图大图大图大图'
re = send_request('Yzuiuma', '') re = send_request4()
assert re["status"] == 0 assert re["status"] == 0
# 流量媒体id为32字符字符 # 流量媒体id为32字符字符
def test_ads_data10(): def test_ads_data11():
parms['site_id'] = '巨量的今日头条、穿山甲、抖音抖音' parms['site_id'] = '巨量的今日头条、穿山甲、抖音抖音'
re = send_request('Yzuiuma', '') re = send_request4()
assert re["status"] == 0 assert re["status"] == 0
# 广告类型为32字符字符 # 广告类型为32字符字符
def test_ads_data10(): def test_ads_data12():
parms['ad_type'] = '巨量的今日头条、穿山甲、抖音抖音' parms['ad_type'] = '巨量的今日头条、穿山甲、抖音抖音'
re = send_request('Yzuiuma', '') re = send_request4()
assert re["status"] == 0 assert re["status"] == 0
...@@ -814,14 +837,14 @@ def test_custom_params1(): ...@@ -814,14 +837,14 @@ def test_custom_params1():
parms['custom_params_9'] = '_自定义' parms['custom_params_9'] = '_自定义'
parms['custom_params_10'] = 'test@#' parms['custom_params_10'] = 'test@#'
re = send_request('Yzuiuma', '') re = send_request4()
assert re["status"] == 0 assert re["status"] == 0
# 自定义触点参数,超过32字符 # 自定义触点参数,超过32字符
def test_custom_params2(): def test_custom_params2():
parms['custom_params_1'] = zf35 parms['custom_params_1'] = zf35
re = send_request('Yzuiuma', '') re = send_request4()
assert re["status"] == 186 assert re["status"] == 186
......
...@@ -44,15 +44,15 @@ parms = { ...@@ -44,15 +44,15 @@ parms = {
# # 广告组名称。限制256字符内。都选传 # # 广告组名称。限制256字符内。都选传
# 'adgroup_name': '', # 'adgroup_name': '',
# # 广告计划id。限制64字符内。都选传 # # 广告计划id。限制64字符内。都选传
# 'adplan_id': '', 'adplan_id': '342312312',
# # 广告计划名称。限制256字符内。都选传 # # 广告计划名称。限制256字符内。都选传
# 'adplan_name': '', # 'adplan_name': '',
# # 广告创意id。限制128字符内。都选传 # # 广告创意id。限制128字符内。都选传
# 'adcreative_id': '', 'adcreative_id': '1111',
# # 广告创意名称。限制256字符内。都选传 # # 广告创意名称。限制256字符内。都选传
# 'adcreative_name': '', # 'adcreative_name': '',
# # 创意类型(例如大图、小图、视频等)。限制16字符内。都选传 # # 创意类型(例如大图、小图、视频等)。限制16字符内。都选传
# 'adcreative_type': '', 'adcreative_type': '大图',
# # 流量媒体id(例如巨量的今日头条、穿山甲、抖音等)。限制32字符内。都选传 # # 流量媒体id(例如巨量的今日头条、穿山甲、抖音等)。限制32字符内。都选传
# 'site_id': '', # 'site_id': '',
# # 流量媒体名称(例如巨量的今日头条、穿山甲、抖音等)。限制128字符内。都选传 # # 流量媒体名称(例如巨量的今日头条、穿山甲、抖音等)。限制128字符内。都选传
...@@ -60,19 +60,19 @@ parms = { ...@@ -60,19 +60,19 @@ parms = {
# # 广告类型(例如开屏、信息流、搜索等)。限制32字符内。都选传。 # # 广告类型(例如开屏、信息流、搜索等)。限制32字符内。都选传。
# 'ad_type': '', # 'ad_type': '',
# # 广告位id。限制64字符内。都选传 # # 广告位id。限制64字符内。都选传
# 'placement_id': '', 'placement_id': '222',
# # 转化id。限制64字符内。都选传 # # 转化id。限制64字符内。都选传
# 'conversion_id': '', 'conversion_id': '333',
# # 广告点击id。限制64字符内。都选传 # # 广告点击id。限制64字符内。都选传
# 'click_id': '', 'click_id': '765432354634',
# # 广告展示id。限制64字符内。都选传 # # 广告展示id。限制64字符内。都选传
# 'impression_id': '', 'impression_id': '444',
# # 广告请求id。限制64字符内。都选传 # # 广告请求id。限制64字符内。都选传
# 'request_id': '', # 'request_id': '',
# # 渠道回调id。限制256字符。都选传 # # 渠道回调id。限制256字符。都选传
# 'callback_id': 'EJiw267wvfQCGKf2g74ZIPD89-vIATAMOAFCIjIwMTkxMTI3MTQxMTEzMDEwMDI2MDc3MjE1MTUwNTczNTBIAQ==', 'callback_id': 'EJiw267wvfQCGKf2g74ZIPD89-vIATAMOAFCIjIwMTkxMTI3MTQxMTEzMDEwMDI2MDc3MjE1MTUwNTczNTBIAQ==',
# 渠道回调地址。限制256字符。都选传 # 渠道回调地址。限制256字符。都选传
'callback_url': 'https://www.baidu.com/?tn=98010089_dg&ch=16/', 'callback_url': 'https%3A%2F%2Furi6.com%2Ftkio%2Fa6ZVNba%3Fnoredirect%3Dtrue',
# 自定触点参数集合。都选传。 # 自定触点参数集合。都选传。
# 'custom_params_1': '' # 'custom_params_1': ''
...@@ -84,9 +84,11 @@ data_temp = json.dumps(parms) ...@@ -84,9 +84,11 @@ data_temp = json.dumps(parms)
# print(p.url) # print(p.url)
# print(p.status_code) # print(p.status_code)
# print(p.content) # print(p.content)
def send_request(dl, cs): def send_request(cs):
global parms global parms
url1 = 'http://tmtest.trackingio.com/receive/turl/' + dl + cs # url1 = 'http://tmtest.trackingio.com/receive/turl/aimmeya' + cs
url1 = 'http://tkio-redirect.solar-engine.com/receive/turl/f6F7zia' + cs
response = requests.get(url=url1, params=parms, timeout=10, verify=False) response = requests.get(url=url1, params=parms, timeout=10, verify=False)
print(response.url) print(response.url)
parms = json.loads(data_temp) parms = json.loads(data_temp)
...@@ -95,9 +97,10 @@ def send_request(dl, cs): ...@@ -95,9 +97,10 @@ def send_request(dl, cs):
def send_request3(dl, cs): def send_request3(cs):
global parms global parms
url1 = 'http://tmtest.trackingio.com/receive/turl/' + dl + cs # url1 = 'http://tmtest.trackingio.com/receive/turl/VVvEz2a' + cs
url1 = 'http://tkio-redirect.solar-engine.com/receive/turl/f6F7zia' + cs
parms['ts'] = int(round(time.time() * 1000)) parms['ts'] = int(round(time.time() * 1000))
response = requests.get(url=url1, params=parms, timeout=10, verify=False) response = requests.get(url=url1, params=parms, timeout=10, verify=False)
print(response.url) print(response.url)
...@@ -111,55 +114,55 @@ def send_request3(dl, cs): ...@@ -111,55 +114,55 @@ def send_request3(dl, cs):
# idfa为空 # idfa为空
def test_idfa1(): def test_idfa1():
parms['idfa'] = '' parms['idfa'] = ''
re = send_request('QJZfmma', '') re = send_request('')
assert re["status"] == 0 assert re["status"] == 0
# idfa为全0 # idfa为全0
def test_idfa2(): def test_idfa2():
parms['idfa'] = '00000000-0000-0000-0000-000000000000' parms['idfa'] = '00000000-0000-0000-0000-000000000000'
re = send_request('nEFnQra', '') re = send_request('')
assert re["status"] == 0 assert re["status"] == 0
# idfa为32字符 # idfa为32字符
def test_idfa3(): def test_idfa3():
parms['idfa'] = '3DEA635F-B24F-434B-833F-4ED028FEAEEF' parms['idfa'] = '3DEA635F-B24F-434B-833F-4ED028FEAEEF'
re = send_request('nEFnQra', '') re = send_request('')
assert re["status"] == 0 assert re["status"] == 0
# idfa非32字符 # idfa非32字符
def test_idfa4(): def test_idfa4():
parms['idfa'] = zf35 parms['idfa'] = zf35
re = send_request('nEFnQra', '') re = send_request('')
assert re["status"] == 124 assert re["status"] == 124
# idfa_md5为空 # idfa_md5为空
def test_idfa_md51(): def test_idfa_md51():
parms['idfa_md5'] = '' parms['idfa_md5'] = ''
re = send_request('nEFnQra', '') re = send_request('')
assert re["status"] == 0 assert re["status"] == 0
# idfa_md5为全0 md5加密 # idfa_md5为全0 md5加密
def test_idfa_md52(): def test_idfa_md52():
parms['idfa_md5'] = '9f89c84a559f573636a47ff8daed0d33' parms['idfa_md5'] = '9f89c84a559f573636a47ff8daed0d33'
re = send_request('nEFnQra', '') re = send_request('')
assert re["status"] == 0 assert re["status"] == 0
# idfa_md5为32字符 # idfa_md5为32字符
def test_idfa_md53(): def test_idfa_md53():
parms['idfa_md5'] = '8e488a40a17aed2f6752f51382a4eafc' parms['idfa_md5'] = '8e488a40a17aed2f6752f51382a4eafc'
re = send_request('nEFnQra', '') re = send_request('')
assert re["status"] == 0 assert re["status"] == 0
# idfa_md5非32字符 # idfa_md5非32字符
def test_idfa_md54(): def test_idfa_md54():
parms['idfa_md5'] = zf35 parms['idfa_md5'] = zf35
re = send_request('nEFnQra', '') re = send_request('')
assert re["status"] == 187 assert re["status"] == 187
...@@ -168,27 +171,27 @@ def test_idfa_md54(): ...@@ -168,27 +171,27 @@ def test_idfa_md54():
# idfv为空 # idfv为空
def test_idfv1(): def test_idfv1():
parms['idfv'] = '' parms['idfv'] = ''
re = send_request('nEFnQra', '') re = send_request('')
assert re["status"] == 0 assert re["status"] == 0
# idfv为全0 # idfv为全0
def test_idfv2(): def test_idfv2():
parms['idfv'] = '00000000-0000-0000-0000-000000000000' parms['idfv'] = '00000000-0000-0000-0000-000000000000'
re = send_request('nEFnQra', '') re = send_request('')
assert re["status"] == 0 assert re["status"] == 0
# idfv为32字符 # idfv为32字符
def test_idfv3(): def test_idfv3():
parms['idfv'] = '3DEA635F-B24F-434B-833F-4ED028FEAEEF' parms['idfv'] = '3DEA635F-B24F-434B-833F-4ED028FEAEEF'
re = send_request('nEFnQra', '') re = send_request('')
assert re["status"] == 0 assert re["status"] == 0
# idfv非32字符 # idfv非32字符
def test_idfv4(): def test_idfv4():
parms['idfv'] = zf35 parms['idfv'] = zf35
re = send_request('nEFnQra', '') re = send_request('')
assert re["status"] == 125 assert re["status"] == 125
...@@ -196,28 +199,28 @@ def test_idfv4(): ...@@ -196,28 +199,28 @@ def test_idfv4():
# idfv_md5为空 # idfv_md5为空
def test_idfv_md51(): def test_idfv_md51():
parms['idfv_md5'] = '' parms['idfv_md5'] = ''
re = send_request('nEFnQra', '') re = send_request('')
assert re["status"] == 0 assert re["status"] == 0
# idfv_md5为全0 md5加密 # idfv_md5为全0 md5加密
def test_idfv_md52(): def test_idfv_md52():
parms['idfv_md5'] = '9f89c84a559f573636a47ff8daed0d33' parms['idfv_md5'] = '9f89c84a559f573636a47ff8daed0d33'
re = send_request('nEFnQra', '') re = send_request('')
assert re["status"] == 0 assert re["status"] == 0
# idfv_md5为32字符 # idfv_md5为32字符
def test_idfv_md53(): def test_idfv_md53():
parms['idfa_md5'] = '8e488a40a17aed2f6752f51382a4eafc' parms['idfa_md5'] = '8e488a40a17aed2f6752f51382a4eafc'
re = send_request('nEFnQra', '') re = send_request('')
assert re["status"] == 0 assert re["status"] == 0
# idfv_md5非32字符 # idfv_md5非32字符
def test_idfv_md54(): def test_idfv_md54():
parms['idfv_md5'] = zf35 parms['idfv_md5'] = zf35
re = send_request('nEFnQra', '') re = send_request('')
assert re["status"] == 188 assert re["status"] == 188
...@@ -225,21 +228,21 @@ def test_idfv_md54(): ...@@ -225,21 +228,21 @@ def test_idfv_md54():
# 短链是ios,传oaid # 短链是ios,传oaid
def test_oaid(): def test_oaid():
parms['oaid'] = '3DEA635F-B24F-434B-833F-4ED028FEAEE' parms['oaid'] = '3DEA635F-B24F-434B-833F-4ED028FEAEE'
re = send_request('nEFnQra', '') re = send_request('')
assert re["status"] == 115 assert re["status"] == 115
# 短链是ios,传oaid_md5 # 短链是ios,传oaid_md5
def test_oaid_md5(): def test_oaid_md5():
parms['oaid_md5'] = '8e488a40a17aed2f6752f51382a4eafc' parms['oaid_md5'] = '8e488a40a17aed2f6752f51382a4eafc'
re = send_request('nEFnQra', '') re = send_request('')
assert re["status"] == 115 assert re["status"] == 115
# 短链是ios,传imei1 # 短链是ios,传imei1
def test_imei1(): def test_imei1():
parms['imei1'] = '8342732742383' parms['imei1'] = '8342732742383'
re = send_request('nEFnQra', '') re = send_request('')
assert re["status"] == 115 assert re["status"] == 115
...@@ -247,35 +250,35 @@ def test_imei1(): ...@@ -247,35 +250,35 @@ def test_imei1():
# 短链是ios,传imei1_md5 # 短链是ios,传imei1_md5
def test_imei1_md5(): def test_imei1_md5():
parms['imei1_md5'] = '8e488a40a17aed2f6752f51382a4eafc' parms['imei1_md5'] = '8e488a40a17aed2f6752f51382a4eafc'
re = send_request('nEFnQra', '') re = send_request('')
assert re["status"] == 115 assert re["status"] == 115
# 短链是ios,传imei2 # 短链是ios,传imei2
def test_imei2(): def test_imei2():
parms['imei2'] = '8342732742383' parms['imei2'] = '8342732742383'
re = send_request('nEFnQra', '') re = send_request('')
assert re["status"] == 115 assert re["status"] == 115
# 短链是ios,传imei2_md5 # 短链是ios,传imei2_md5
def test_imei2_md5(): def test_imei2_md5():
parms['imei2_md5'] = '8e488a40a17aed2f6752f51382a4eafc' parms['imei2_md5'] = '8e488a40a17aed2f6752f51382a4eafc'
re = send_request('nEFnQra', '') re = send_request('')
assert re["status"] == 115 assert re["status"] == 115
# 短链是ios,传gaid # 短链是ios,传gaid
def test_gaid(): def test_gaid():
parms['gaid'] = 'B21C5EC5-9921-42FD-AAC5-07A0EB6CF1A0' parms['gaid'] = 'B21C5EC5-9921-42FD-AAC5-07A0EB6CF1A0'
re = send_request('nEFnQra', '') re = send_request('')
assert re["status"] == 115 assert re["status"] == 115
# 短链是ios,传gaid_md5 # 短链是ios,传gaid_md5
def test_gaid_md5(): def test_gaid_md5():
parms['gaid_md5'] = '8e488a40a17aed2f6752f51382a4eafc' parms['gaid_md5'] = '8e488a40a17aed2f6752f51382a4eafc'
re = send_request('nEFnQra', '') re = send_request('')
assert re["status"] == 115 assert re["status"] == 115
...@@ -283,7 +286,7 @@ def test_gaid_md5(): ...@@ -283,7 +286,7 @@ def test_gaid_md5():
# 短链是ios,传mac # 短链是ios,传mac
def test_mac(): def test_mac():
parms['mac'] = 'B21C5EC5-9921-42FD-AAC5-07A0EB6CF1A0' parms['mac'] = 'B21C5EC5-9921-42FD-AAC5-07A0EB6CF1A0'
re = send_request('nEFnQra', '') re = send_request('')
assert re["status"] == 115 assert re["status"] == 115
...@@ -291,14 +294,14 @@ def test_mac(): ...@@ -291,14 +294,14 @@ def test_mac():
# 短链是ios,传mac_md5 # 短链是ios,传mac_md5
def test_mac_md5(): def test_mac_md5():
parms['mac_md5'] = '8e488a40a17aed2f6752f51382a4eafc' parms['mac_md5'] = '8e488a40a17aed2f6752f51382a4eafc'
re = send_request('nEFnQra', '') re = send_request('')
assert re["status"] == 115 assert re["status"] == 115
# 短链是ios,传android_id # 短链是ios,传android_id
def test_android_id(): def test_android_id():
parms['android_id'] = '1a34fc556a43c453' parms['android_id'] = '1a34fc556a43c453'
re = send_request('nEFnQra', '') re = send_request('')
assert re["status"] == 115 assert re["status"] == 115
...@@ -306,7 +309,7 @@ def test_android_id(): ...@@ -306,7 +309,7 @@ def test_android_id():
# 短链是ios,传android_id_md5 # 短链是ios,传android_id_md5
def test_android_id_md5(): def test_android_id_md5():
parms['android_id'] = '8e488a40a17aed2f6752f51382a4eafc' parms['android_id'] = '8e488a40a17aed2f6752f51382a4eafc'
re = send_request('nEFnQra', '') re = send_request('')
assert re["status"] == 115 assert re["status"] == 115
......
...@@ -8,9 +8,8 @@ import random ...@@ -8,9 +8,8 @@ import random
headers = {'Content-Type': 'application/json'} headers = {'Content-Type': 'application/json'}
current_time_13 = int(round(time.time() * 1000)) current_time_13 = int(round(time.time() * 1000))
#测试环境 #测试环境
# URL_install = 'http://10.3.20.39:10202/dpquery' # URL_install = 'http://10.2.20.42:8083/dpquery'
URL_install = 'http://link.trackingio.com/dpquery' URL_install = 'http://link.trackingio.com/dpquery'
class allEvent: class allEvent:
# 激活 # 激活
......
...@@ -3,15 +3,16 @@ import socket ...@@ -3,15 +3,16 @@ import socket
import struct import struct
import random import random
import time import time
# appkey = '16dc0cb882d3dbec4f7f66251a84d6dd' appkey = '3f2706b7afdf89d95ffa7d2e9cc13e2e'
# for _ in range(1): for _ in range(1):
# # 随机生成12为数组 # 随机生成12为数组
# # i = ''.join(str(random.choice(range(10))) for _ in range(12)) # i = ''.join(str(random.choice(range(10))) for _ in range(12))
# i = '352745509625' i = '581386117745'
# # 随机生成ip # 随机生成ip
# ip = socket.inet_ntoa(struct.pack('>I', random.randint(1, 0xffffffff))) ip = socket.inet_ntoa(struct.pack('>I', random.randint(1, 0xffffffff)))
# # ip = '100.120.179.101' # ip = '100.120.179.101'
# # allEvent().ziding_event(i,ip,appkey,event) # allEvent().ziding_event(i,ip,appkey,event)
# allEvent().dp_imei(i, appkey) allEvent().dp_imei(i, appkey)
# # allEvent().dp_ios(i, appkey) # allEvent().dp_ios(i, appkey)
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