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
719174ec
Commit
719174ec
authored
Aug 02, 2021
by
张淑琴
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
历史每月推广明细
parent
af75b689
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
116 additions
and
7 deletions
+116
-7
web2_request.py
all_doctor_api/web2_request.py
+5
-0
web2_request.yaml
all_doctor_api/web2_request.yaml
+10
-0
web_request.py
all_doctor_api/web_request.py
+7
-7
web_request.yaml
all_doctor_api/web_request.yaml
+8
-0
path_setting.py
path_setting.py
+4
-0
test_cpc_doctor_promote_flows.py
test_doctor_case/web2_case/test_cpc_doctor_promote_flows.py
+23
-0
test_cpc_community_promote_flows.py
..._doctor_case/web_case/test_cpc_community_promote_flows.py
+23
-0
cpc_doctor_promote_flows.yaml
test_doctor_data/web2_data/cpc_doctor_promote_flows.yaml
+18
-0
cpc_community_promote_flows.yaml
test_doctor_data/web_data/cpc_community_promote_flows.yaml
+18
-0
No files found.
all_doctor_api/web2_request.py
View file @
719174ec
...
...
@@ -78,6 +78,10 @@ class web2_request(BaseRequest):
self
.
params
[
"category_id"
]
=
category_id
return
self
.
api_send
(
self
.
SERVICE_URL
[
"artemis_cpc_category_service_ids"
])
def
cpc_doctor_promote_flows
(
self
,
month
):
"点点通机构-历史每月推广明细"
self
.
params
[
"month"
]
=
month
return
self
.
api_send
(
self
.
SERVICE_URL
[
"cpc_doctor_promote_flows"
])
if
__name__
==
'__main__'
:
print
(
web2_request
()
.
service_list
(
"1"
,
"10"
,
"-1"
,
"-1"
))
...
...
@@ -92,4 +96,5 @@ if __name__ == '__main__':
print
(
web2_request
()
.
artemis_cpc_categorypromotemanage_list
(
-
1
,
-
1
))
print
(
web2_request
()
.
artemis_cpc_category_query
(
"wangyang"
,
0
))
print
(
web2_request
()
.
artemis_cpc_category_service_ids
(
1
,
10
,
-
1
,
8
))
print
(
web2_request
()
.
cpc_doctor_promote_flows
(
"2021-7"
))
all_doctor_api/web2_request.yaml
View file @
719174ec
...
...
@@ -121,4 +121,13 @@ artemis_cpc_category_service_ids:
category_id
:
${category_id}
data
:
{}
json
:
{}
isLogin
:
1
#需要登录
cpc_doctor_promote_flows
:
method
:
get
url
:
/api/web2/cpc_doctor/promote/flows
params
:
month
:
${month}
data
:
{}
json
:
{}
isLogin
:
1
#需要登录
\ No newline at end of file
all_doctor_api/web_request.py
View file @
719174ec
...
...
@@ -106,11 +106,10 @@ class web_request(BaseRequest):
self
.
params
[
"month"
]
=
month
return
self
.
api_send
(
self
.
ACCOUNT_URL
[
"cpc_promote_flows_excel"
])
def
cpc_community_promote_flows
(
self
,
month
):
"点点通内容-历史每月推广明细"
self
.
params
[
"month"
]
=
month
return
self
.
api_send
(
self
.
ACCOUNT_URL
[
"cpc_community_promote_flows"
])
if
__name__
==
'__main__'
:
...
...
@@ -137,4 +136,5 @@ 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
print
(
web_request
()
.
cpc_promote_flows_excel
(
"2021-7"
))
print
(
web_request
()
.
cpc_community_promote_flows
(
"2021-7"
))
\ No newline at end of file
all_doctor_api/web_request.yaml
View file @
719174ec
...
...
@@ -209,3 +209,11 @@ cpc_promote_flows_excel:
json
:
{}
isLogin
:
1
#需要登录
cpc_community_promote_flows
:
method
:
get
url
:
/api/web/cpc_community/promote/flows
params
:
month
:
${month}
data
:
{}
json
:
{}
isLogin
:
1
#需要登录
path_setting.py
View file @
719174ec
...
...
@@ -491,6 +491,10 @@ CPCCATEGORYSERVICEIDS=os.path.join(BASE_DIR, "backend_auto/test_doctor_data/web2
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"
)
#医生后台-点点通内容-历史每月推广数据
CPCCOMMUNITYPROMOTEFLOWS
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_doctor_data/web_data"
,
"cpc_community_promote_flows.yaml"
)
#医生后台-点点通机构-历史每月推广数据
CPCDOCTORPROMOTEFLOWS
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_doctor_data/web2_data"
,
"cpc_doctor_promote_flows.yaml"
)
...
...
test_doctor_case/web2_case/test_cpc_doctor_promote_flows.py
0 → 100644
View file @
719174ec
import
pytest
from
ids_list
import
get_ids
import
path_setting
from
in_common.base_request
import
BaseRequest
from
all_doctor_api.web2_request
import
web2_request
class
TestCpcDoctorPromoteFlows
:
data
=
BaseRequest
()
.
api_load
(
path_setting
.
CPCDOCTORPROMOTEFLOWS
)
cpcdoctorpromoteflows_case
,
cpcdoctorpromoteflows_data
=
get_ids
(
data
,
"cpc_doctor_promote_flows"
)
@pytest.mark.parametrize
(
"param"
,
cpcdoctorpromoteflows_data
,
ids
=
cpcdoctorpromoteflows_case
)
def
test_cpc_doctor_promote_flows
(
self
,
param
):
'''点点通商品-历史每月推广明细-导出'''
r
=
web2_request
()
.
cpc_doctor_promote_flows
(
param
[
"month"
])
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_community_promote_flows.py
0 → 100644
View file @
719174ec
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
TestCpcCommunityPromoteFlows
:
data
=
BaseRequest
()
.
api_load
(
path_setting
.
CPCCOMMUNITYPROMOTEFLOWS
)
cpccommunitypromoteflows_case
,
cpccommunitypromoteflows_data
=
get_ids
(
data
,
"cpc_community_promote_flows"
)
@pytest.mark.parametrize
(
"param"
,
cpccommunitypromoteflows_data
,
ids
=
cpccommunitypromoteflows_case
)
def
test_cpc_community_promote_flows
(
self
,
param
):
'''点点通商品-历史每月推广明细-导出'''
r
=
web_request
()
.
cpc_community_promote_flows
(
param
[
"month"
])
if
r
[
"error"
]
==
0
:
flows_list
=
r
.
get
(
"data"
)
.
get
(
"flows_list"
,
[])
assert
len
(
flows_list
)
>=
param
[
"assert"
]
test_doctor_data/web2_data/cpc_doctor_promote_flows.yaml
0 → 100644
View file @
719174ec
cpc_doctor_promote_flows
:
#点点通机构-历史每月推广数据
-
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
test_doctor_data/web_data/cpc_community_promote_flows.yaml
0 → 100644
View file @
719174ec
cpc_community_promote_flows
:
#点点通内容-历史每月推广数据
-
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