Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
T
tkio-test-case
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
liuxiaoxing
tkio-test-case
Commits
ae0de5c7
Commit
ae0de5c7
authored
May 27, 2022
by
liuxiaoxing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
asa归因逻辑
parent
90c5b3a2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
128 additions
and
1 deletion
+128
-1
attributioncaseios.py
microservices/attributioncaseios.py
+128
-1
No files found.
microservices/attributioncaseios.py
View file @
ae0de5c7
...
...
@@ -1225,7 +1225,7 @@ def test_atb44():
# -----------------------asa逻辑测试--------------------
#数据为测试数据,不是asa激活,走正常归因逻辑
def
test_a
tb44
():
def
test_a
sa1
():
i
=
idfacode
()
v
=
idfvcode
()
receiveios
.
data
[
0
][
'device_info'
][
'idfa'
]
=
i
...
...
@@ -1239,7 +1239,133 @@ def test_atb44():
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'
]
=
'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
()
print
(
i
)
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment