Commit ae0de5c7 by liuxiaoxing

asa归因逻辑

parent 90c5b3a2
...@@ -1225,7 +1225,7 @@ def test_atb44(): ...@@ -1225,7 +1225,7 @@ def test_atb44():
# -----------------------asa逻辑测试-------------------- # -----------------------asa逻辑测试--------------------
#数据为测试数据,不是asa激活,走正常归因逻辑 #数据为测试数据,不是asa激活,走正常归因逻辑
def test_atb44(): def test_asa1():
i = idfacode() i = idfacode()
v = idfvcode() v = idfvcode()
receiveios.data[0]['device_info']['idfa'] = i receiveios.data[0]['device_info']['idfa'] = i
...@@ -1239,7 +1239,133 @@ def test_atb44(): ...@@ -1239,7 +1239,133 @@ def test_atb44():
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]['asa_info']['iad_info']['iad-attribution'] = 'true' receiveios.data[0]['asa_info']['iad_info']['iad-attribution'] = 'true'
receiveios.data[0]['asa_info']['iad_info']['iad-org-id'] = '1234567890' receiveios.data[0]['asa_info']['iad_info']['iad-org-id'] = '1234567890'
receiveios.data[0]['asa_info']['adservices_info']['token'] = ''
receiveios.send_request()
print(i)
#数据不为测试数据,是asa激活,不走正常归因逻辑
def test_asa2():
i = idfacode()
v = idfvcode()
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.data[0]['device_info']['device_id_md5_type'] = 'idfa_md5'
receiveios.data[0]['asa_info']['iad_info']['iad-attribution'] = 'true'
receiveios.data[0]['asa_info']['iad_info']['iad-org-id'] = '12345678901'
receiveios.data[0]['asa_info']['adservices_info']['token'] = ''
receiveios.send_request()
print(i)
# iad归因为空且tkoen为空,走正常归因逻辑
def test_asa3():
i = idfacode()
v = idfvcode()
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.data[0]['device_info']['device_id_md5_type'] = 'idfa_md5'
receiveios.data[0]['asa_info']['iad_info']['iad-attribution'] = ''
receiveios.data[0]['asa_info']['iad_info']['iad-org-id'] = '12345678901'
receiveios.data[0]['asa_info']['adservices_info']['token'] = ''
receiveios.send_request()
print(i)
#iad-org-id为空,iad-attribution为true
def test_asa4():
i = idfacode()
v = idfvcode()
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.data[0]['device_info']['device_id_md5_type'] = 'idfa_md5'
receiveios.data[0]['asa_info']['iad_info']['iad-attribution'] = 'true'
receiveios.data[0]['asa_info']['iad_info']['iad-org-id'] = ''
receiveios.data[0]['asa_info']['adservices_info']['token'] = ''
receiveios.send_request()
print(i)
# iad归因为false且tkoen为空,走正常归因逻辑
def test_asa5():
i = idfacode()
v = idfvcode()
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.data[0]['device_info']['device_id_md5_type'] = 'idfa_md5'
receiveios.data[0]['asa_info']['iad_info']['iad-attribution'] = 'false'
receiveios.data[0]['asa_info']['iad_info']['iad-org-id'] = '12345678901'
receiveios.data[0]['asa_info']['adservices_info']['token'] = ''
receiveios.send_request()
print(i)
# 不传iad-attribution和token字段,走正常归因逻辑
def test_asa6():
i = idfacode()
v = idfvcode()
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.data[0]['device_info']['device_id_md5_type'] = 'idfa_md5'
receiveios.data[0]['asa_info']['iad_info']['iad-attribution'] = ''
receiveios.data[0]['asa_info']['iad_info']['iad-org-id'] = '12345678901'
receiveios.data[0]['asa_info']['adservices_info']['token'] = ''
receiveios.send_request()
print(i)
#iad-attribution为大写TRUE,iad-org-id非测试数据,走正常归因
def test_asa7():
i = idfacode()
v = idfvcode()
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.data[0]['device_info']['device_id_md5_type'] = 'idfa_md5'
receiveios.data[0]['asa_info']['iad_info']['iad-attribution'] = 'TRUE'
receiveios.data[0]['asa_info']['iad_info']['iad-org-id'] = '423323'
receiveios.data[0]['asa_info']['adservices_info']['token'] = ''
receiveios.send_request() receiveios.send_request()
print(i) print(i)
\ No newline at end of file
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