Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
B
backend_auto
Project
Project
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
邓莹莹
backend_auto
Commits
1e372194
Commit
1e372194
authored
Aug 02, 2021
by
张淑琴
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
导出
parent
18e445a0
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
64 additions
and
7 deletions
+64
-7
web_request.py
all_doctor_api/web_request.py
+9
-2
web_request.yaml
all_doctor_api/web_request.yaml
+10
-1
path_setting.py
path_setting.py
+2
-0
test_cpc_promote_flows.py
test_doctor_case/web_case/test_cpc_promote_flows.py
+1
-1
test_cpc_promote_flows_excel.py
test_doctor_case/web_case/test_cpc_promote_flows_excel.py
+20
-0
cpc_promote_flows.yaml
test_doctor_data/web_data/cpc_promote_flows.yaml
+4
-3
cpc_promote_flows_excel.yaml
test_doctor_data/web_data/cpc_promote_flows_excel.yaml
+18
-0
No files found.
all_doctor_api/web_request.py
View file @
1e372194
...
...
@@ -96,11 +96,16 @@ class web_request(BaseRequest):
self
.
params
[
"page"
]
=
page
return
self
.
api_send
(
self
.
ACCOUNT_URL
[
"cpc_community_click_logs"
])
def
cpc_promote_flows
(
self
,
mo
u
th
):
def
cpc_promote_flows
(
self
,
mo
n
th
):
"点点通商品-历史每月推广明细"
self
.
params
[
"mo
uth"
]
=
mou
th
self
.
params
[
"mo
nth"
]
=
mon
th
return
self
.
api_send
(
self
.
ACCOUNT_URL
[
"cpc_promote_flows"
])
def
cpc_promote_flows_excel
(
self
,
month
):
"点点通商品-历史每月推广明细-导出"
self
.
params
[
"month"
]
=
month
return
self
.
api_send
(
self
.
ACCOUNT_URL
[
"cpc_promote_flows_excel"
])
...
...
@@ -132,3 +137,4 @@ if __name__ == '__main__':
print
(
web_request
()
.
cpc_community_data_info
(
"15604767"
,
"2021-07-02"
,
"2021-07-12"
))
print
(
web_request
()
.
cpc_community_click_logs
(
1
))
print
(
web_request
()
.
cpc_promote_flows
(
"2021-7"
))
print
(
web_request
()
.
cpc_promote_flows_excel
(
"2021-7"
))
\ No newline at end of file
all_doctor_api/web_request.yaml
View file @
1e372194
...
...
@@ -195,7 +195,16 @@ cpc_promote_flows:
method
:
get
url
:
/api/web/cpc/promote/flows
params
:
mouth
:
${mouth}
month
:
${month}
data
:
{}
json
:
{}
isLogin
:
1
#需要登录
cpc_promote_flows_excel
:
method
:
get
url
:
/api/web/cpc/promote/flows/excel
params
:
month
:
${month}
data
:
{}
json
:
{}
isLogin
:
1
#需要登录
...
...
path_setting.py
View file @
1e372194
...
...
@@ -487,6 +487,8 @@ CPCCATEGORYQUERY=os.path.join(BASE_DIR, "backend_auto/test_doctor_data/web2_data
CPCCATEGORYSERVICEIDS
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_doctor_data/web2_data"
,
"artemis_cpc_category_service_ids.yaml"
)
#医生后台-点点通商品-历史每月推广数据
CPCPROMOTEFLOWS
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_doctor_data/web_data"
,
"cpc_promote_flows.yaml"
)
#医生后台-点点通商品-历史每月推广数据-导出
CPCPROMOTEFLOWSEXCEL
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_doctor_data/web_data"
,
"cpc_promote_flows_excel.yaml"
)
...
...
test_doctor_case/web_case/test_cpc_promote_flows.py
View file @
1e372194
...
...
@@ -14,7 +14,7 @@ class TestCpcPromoteFlows:
@pytest.mark.parametrize
(
"param"
,
cpcpromoteflows_data
,
ids
=
cpcpromoteflows_case
)
def
test_cpc_promote_flows
(
self
,
param
):
'''点点通商品-历史每月推广明细'''
r
=
web_request
()
.
cpc_promote_flows
(
param
[
"mo
u
th"
])
r
=
web_request
()
.
cpc_promote_flows
(
param
[
"mo
n
th"
])
if
r
[
"error"
]
==
0
:
flows_list
=
r
.
get
(
"data"
)
.
get
(
"flows_list"
,
[])
assert
len
(
flows_list
)
>=
param
[
"assert"
]
...
...
test_doctor_case/web_case/test_cpc_promote_flows_excel.py
0 → 100644
View file @
1e372194
import
pytest
from
ids_list
import
get_ids
import
path_setting
from
in_common.base_request
import
BaseRequest
from
all_doctor_api.web_request
import
web_request
class
TestCpcPromoteFlows
:
data
=
BaseRequest
()
.
api_load
(
path_setting
.
CPCPROMOTEFLOWSEXCEL
)
cpcpromoteflowsexcel_case
,
cpcpromoteflowsexcel_data
=
get_ids
(
data
,
"cpc_promote_flows_excel"
)
@pytest.mark.parametrize
(
"param"
,
cpcpromoteflowsexcel_data
,
ids
=
cpcpromoteflowsexcel_case
)
def
test_cpc_promote_flows_excel
(
self
,
param
):
'''点点通商品-历史每月推广明细-导出'''
r
=
web_request
()
.
cpc_promote_flows_excel
(
param
[
"month"
])
assert
r
[
"error"
]
==
0
test_doctor_data/web_data/cpc_promote_flows.yaml
View file @
1e372194
...
...
@@ -2,16 +2,16 @@ cpc_promote_flows:
#点点通商品-历史每月推广数据
-
case
:
"
点点通商品-历史每月推广数据-21年7月"
mo
u
th
:
"
2021-7"
mo
n
th
:
"
2021-7"
assert
:
0
-
case
:
"
点点通商品-历史每月推广数据-20年7月"
mo
u
th
:
"
2020-7"
mo
n
th
:
"
2020-7"
assert
:
0
-
case
:
"
点点通商品-历史每月推广数据-25年7月"
mo
u
th
:
"
2025-7"
mo
n
th
:
"
2025-7"
assert
:
0
\ No newline at end of file
test_doctor_data/web_data/cpc_promote_flows_excel.yaml
0 → 100644
View file @
1e372194
cpc_promote_flows_excel
:
#点点通商品-历史每月推广数据-导出
-
case
:
"
点点通商品-历史每月推广数据-导出-21年7月"
month
:
"
2021-7"
assert
:
0
-
case
:
"
点点通商品-历史每月推广数据-导出-20年7月"
month
:
"
2020-7"
assert
:
0
-
case
:
"
点点通商品-历史每月推广数据-导出-25年7月"
month
:
"
2025-7"
assert
:
0
\ 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