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
18e445a0
Commit
18e445a0
authored
Aug 02, 2021
by
张淑琴
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
推广明细
parent
0aae8b30
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
67 additions
and
2 deletions
+67
-2
web_request.py
all_doctor_api/web_request.py
+15
-2
web_request.yaml
all_doctor_api/web_request.yaml
+10
-0
path_setting.py
path_setting.py
+2
-0
test_cpc_promote_flows.py
test_doctor_case/web_case/test_cpc_promote_flows.py
+22
-0
cpc_promote_flows.yaml
test_doctor_data/web_data/cpc_promote_flows.yaml
+18
-0
No files found.
all_doctor_api/web_request.py
View file @
18e445a0
...
@@ -63,32 +63,44 @@ class web_request(BaseRequest):
...
@@ -63,32 +63,44 @@ class web_request(BaseRequest):
# return self.api_send(self.ACCOUNT_URL["file_upload"])
# return self.api_send(self.ACCOUNT_URL["file_upload"])
def
cpc_homepage
(
self
):
def
cpc_homepage
(
self
):
return
self
.
api_send
(
self
.
ACCOUNT_URL
[
"cpc_homepage"
])
return
self
.
api_send
(
self
.
ACCOUNT_URL
[
"cpc_homepage"
])
def
artemis_ad_type_list
(
self
):
def
artemis_ad_type_list
(
self
):
return
self
.
api_send
(
self
.
ACCOUNT_URL
[
"artemis_ad_type_list"
])
return
self
.
api_send
(
self
.
ACCOUNT_URL
[
"artemis_ad_type_list"
])
def
artemis_order_list
(
self
,
status
,
page
):
def
artemis_order_list
(
self
,
status
,
page
):
self
.
params
[
"status"
]
=
status
self
.
params
[
"status"
]
=
status
self
.
params
[
"page"
]
=
page
self
.
params
[
"page"
]
=
page
return
self
.
api_send
(
self
.
ACCOUNT_URL
[
"artemis_order_list"
])
return
self
.
api_send
(
self
.
ACCOUNT_URL
[
"artemis_order_list"
])
def
artemis_order_id_detail
(
self
):
def
artemis_order_id_detail
(
self
):
"上线中订单详情页"
"上线中订单详情页"
return
self
.
api_send
(
self
.
ACCOUNT_URL
[
"artemis_order_id_detail"
])
return
self
.
api_send
(
self
.
ACCOUNT_URL
[
"artemis_order_id_detail"
])
def
cpc_community_homepage
(
self
):
def
cpc_community_homepage
(
self
):
"点点通-内容-概览"
"点点通-内容-概览"
return
self
.
api_send
(
self
.
ACCOUNT_URL
[
"cpc_community_homepage"
])
return
self
.
api_send
(
self
.
ACCOUNT_URL
[
"cpc_community_homepage"
])
def
cpc_community_diaries
(
self
):
def
cpc_community_diaries
(
self
):
"点点通-内容-数据统计-内容"
"点点通-内容-数据统计-内容"
return
self
.
api_send
(
self
.
ACCOUNT_URL
[
"cpc_community_diaries"
])
return
self
.
api_send
(
self
.
ACCOUNT_URL
[
"cpc_community_diaries"
])
def
cpc_community_data_info
(
self
,
diary_id
,
start_time
,
end_time
):
def
cpc_community_data_info
(
self
,
diary_id
,
start_time
,
end_time
):
"点点通-内容-数据统计"
"点点通-内容-数据统计"
self
.
params
[
"diary_id"
]
=
diary_id
self
.
params
[
"diary_id"
]
=
diary_id
self
.
params
[
"start_time"
]
=
start_time
self
.
params
[
"start_time"
]
=
start_time
self
.
params
[
"end_time"
]
=
end_time
self
.
params
[
"end_time"
]
=
end_time
return
self
.
api_send
(
self
.
ACCOUNT_URL
[
"cpc_community_data_info"
])
return
self
.
api_send
(
self
.
ACCOUNT_URL
[
"cpc_community_data_info"
])
def
cpc_community_click_logs
(
self
,
page
):
def
cpc_community_click_logs
(
self
,
page
):
"点点通-内容-推广明细"
"点点通-内容-推广明细"
self
.
params
[
"page"
]
=
page
self
.
params
[
"page"
]
=
page
return
self
.
api_send
(
self
.
ACCOUNT_URL
[
"cpc_community_click_logs"
])
return
self
.
api_send
(
self
.
ACCOUNT_URL
[
"cpc_community_click_logs"
])
def
cpc_promote_flows
(
self
,
mouth
):
"点点通商品-历史每月推广明细"
self
.
params
[
"mouth"
]
=
mouth
return
self
.
api_send
(
self
.
ACCOUNT_URL
[
"cpc_promote_flows"
])
...
@@ -118,4 +130,5 @@ if __name__ == '__main__':
...
@@ -118,4 +130,5 @@ if __name__ == '__main__':
print
(
web_request
()
.
cpc_community_homepage
())
print
(
web_request
()
.
cpc_community_homepage
())
print
(
web_request
()
.
cpc_community_diaries
())
print
(
web_request
()
.
cpc_community_diaries
())
print
(
web_request
()
.
cpc_community_data_info
(
"15604767"
,
"2021-07-02"
,
"2021-07-12"
))
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_community_click_logs
(
1
))
\ No newline at end of file
print
(
web_request
()
.
cpc_promote_flows
(
"2021-7"
))
\ No newline at end of file
all_doctor_api/web_request.yaml
View file @
18e445a0
...
@@ -190,3 +190,13 @@ cpc_community_click_logs:
...
@@ -190,3 +190,13 @@ cpc_community_click_logs:
data
:
{}
data
:
{}
json
:
{}
json
:
{}
isLogin
:
1
#需要登录
isLogin
:
1
#需要登录
cpc_promote_flows
:
method
:
get
url
:
/api/web/cpc/promote/flows
params
:
mouth
:
${mouth}
data
:
{}
json
:
{}
isLogin
:
1
#需要登录
path_setting.py
View file @
18e445a0
...
@@ -485,6 +485,8 @@ CPCCATEGORYPROMOTEMANAGELIST=os.path.join(BASE_DIR, "backend_auto/test_doctor_da
...
@@ -485,6 +485,8 @@ CPCCATEGORYPROMOTEMANAGELIST=os.path.join(BASE_DIR, "backend_auto/test_doctor_da
CPCCATEGORYQUERY
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_doctor_data/web2_data"
,
"artemis_cpc_category_query.yaml"
)
CPCCATEGORYQUERY
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_doctor_data/web2_data"
,
"artemis_cpc_category_query.yaml"
)
#医生后台-点点通商品-品类推广管理-新增推广品类-关联美购
#医生后台-点点通商品-品类推广管理-新增推广品类-关联美购
CPCCATEGORYSERVICEIDS
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_doctor_data/web2_data"
,
"artemis_cpc_category_service_ids.yaml"
)
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"
)
...
...
test_doctor_case/web_case/test_cpc_promote_flows.py
0 → 100644
View file @
18e445a0
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
.
CPCPROMOTEFLOWS
)
cpcpromoteflows_case
,
cpcpromoteflows_data
=
get_ids
(
data
,
"cpc_promote_flows"
)
@pytest.mark.parametrize
(
"param"
,
cpcpromoteflows_data
,
ids
=
cpcpromoteflows_case
)
def
test_cpc_promote_flows
(
self
,
param
):
'''点点通商品-历史每月推广明细'''
r
=
web_request
()
.
cpc_promote_flows
(
param
[
"mouth"
])
if
r
[
"error"
]
==
0
:
flows_list
=
r
.
get
(
"data"
)
.
get
(
"flows_list"
,
[])
assert
len
(
flows_list
)
>=
param
[
"assert"
]
test_doctor_data/web_data/cpc_promote_flows.yaml
0 → 100644
View file @
18e445a0
cpc_promote_flows
:
#点点通商品-历史每月推广数据
-
case
:
"
点点通商品-历史每月推广数据-21年7月"
mouth
:
"
2021-7"
assert
:
0
-
case
:
"
点点通商品-历史每月推广数据-20年7月"
mouth
:
"
2020-7"
assert
:
0
-
case
:
"
点点通商品-历史每月推广数据-25年7月"
mouth
:
"
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