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
4d51f523
Commit
4d51f523
authored
Jul 14, 2021
by
张淑琴
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
数据统计内容
parent
4c57bb48
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
105 additions
and
3 deletions
+105
-3
web_request.py
all_doctor_api/web_request.py
+16
-3
web_request.yaml
all_doctor_api/web_request.yaml
+20
-0
path_setting.py
path_setting.py
+5
-0
test_cpc_community_data_info.py
test_doctor_case/web_case/test_cpc_community_data_info.py
+27
-0
test_cpc_community_diaries.py
test_doctor_case/web_case/test_cpc_community_diaries.py
+22
-0
cpc_community_data_info.yaml
test_doctor_data/web_data/cpc_community_data_info.yaml
+8
-0
cpc_community_diaries.yaml
test_doctor_data/web_data/cpc_community_diaries.yaml
+7
-0
No files found.
all_doctor_api/web_request.py
View file @
4d51f523
...
...
@@ -75,6 +75,18 @@ class web_request(BaseRequest):
def
cpc_community_homepage
(
self
):
"点点通-内容-概览"
return
self
.
api_send
(
self
.
ACCOUNT_URL
[
"cpc_community_homepage"
])
def
cpc_community_diaries
(
self
):
"点点通-内容-数据统计-内容"
return
self
.
api_send
(
self
.
ACCOUNT_URL
[
"cpc_community_diaries"
])
def
cpc_community_data_info
(
self
,
diary_id
,
start_time
,
end_time
):
"点点通-内容-数据统计"
self
.
params
[
"diary_id"
]
=
diary_id
self
.
params
[
"start_time"
]
=
start_time
self
.
params
[
"end_time"
]
=
end_time
return
self
.
api_send
(
self
.
ACCOUNT_URL
[
"cpc_community_data_info"
])
...
...
@@ -95,9 +107,10 @@ if __name__ == '__main__':
print
(
web_request
()
.
conversation_user_id
(
0
,
"您好"
,
602329
,
"271caac2ae1687ca0a56ee18115b8183"
,
"NLeTxEx1BOQo1zjv2us9BQ00ViMAHGpJ"
))
print
(
web_request
()
.
cpc_homepage
())
print
(
web_request
()
.
artemis_ad_type_list
())
print
(
"发送"
)
print
(
web_request
()
.
artemis_order_list
(
0
,
1
))
print
(
web_request
()
.
artemis_order_list
(
1
,
1
))
print
(
web_request
()
.
artemis_order_list
(
2
,
1
))
print
(
web_request
()
.
artemis_order_id_detail
())
print
(
web_request
()
.
cpc_community_homepage
())
\ No newline at end of file
print
(
web_request
()
.
cpc_community_homepage
())
print
(
web_request
()
.
cpc_community_diaries
())
print
(
web_request
()
.
cpc_community_data_info
(
"15604767"
,
"2021-07-02"
,
"2021-07-12"
))
\ No newline at end of file
all_doctor_api/web_request.yaml
View file @
4d51f523
...
...
@@ -161,4 +161,23 @@ cpc_community_homepage:
params
:
{}
data
:
{}
json
:
{}
isLogin
:
1
#需要登录
cpc_community_diaries
:
method
:
get
url
:
/api/web/cpc_community/diaries
params
:
{}
data
:
{}
json
:
{}
isLogin
:
1
#需要登录
cpc_community_data_info
:
method
:
get
url
:
/api/web/cpc_community/data/info
params
:
diary_id
:
${diary_id}
start_time
:
${start_time}
end_time
:
${end_time}
data
:
{}
json
:
{}
isLogin
:
1
#需要登录
\ No newline at end of file
path_setting.py
View file @
4d51f523
...
...
@@ -437,6 +437,11 @@ ADPACKAGEORDERDETAIL=os.path.join(BASE_DIR, "backend_auto/test_doctor_data/web2_
CPCHOMEPAGE
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_doctor_data/web_data"
,
"cpc_homepage.yaml"
)
#医生后台-点点通内容-概览
CPCCOMMUNITYHOMEPAGE
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_doctor_data/web_data"
,
"cpc_community_homepage.yaml"
)
#医生后台-点点通内容-数据统计-内容
CPCCOMMUNITYDIARIES
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_doctor_data/web_data"
,
"cpc_community_diaries.yaml"
)
#医生后台-点点通内容-数据统计
CPCCOMMUNITYDATAINFO
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_doctor_data/web_data"
,
"cpc_community_data_info.yaml"
)
#更美次卡橱窗组件商品
VISUAL_BEAUTY_CARD_SERVICES_CONFIG
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/all_backend_api"
,
"visual_beauty_card.yaml"
)
...
...
test_doctor_case/web_case/test_cpc_community_data_info.py
0 → 100644
View file @
4d51f523
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
TestCpcCommunityDataInfo
:
data
=
BaseRequest
()
.
api_load
(
path_setting
.
CPCCOMMUNITYDATAINFO
)
cpccommunitydatainfo_case
,
cpccommunitydatainfo_data
=
get_ids
(
data
,
"cpc_community_data_info"
)
@pytest.mark.parametrize
(
"param"
,
cpccommunitydatainfo_data
,
ids
=
cpccommunitydatainfo_case
)
def
test_cpc_community_data_info
(
self
,
param
):
'''点点通内容-数据统计'''
r
=
web_request
()
.
cpc_community_data_info
(
param
[
"diary_id"
],
param
[
"start_time"
],
param
[
"end_time"
])
if
r
[
"error"
]
==
0
:
click_list
=
r
.
get
(
"data"
)
.
get
(
"click_list"
,
[])
paid_list
=
r
.
get
(
"data"
)
.
get
(
"paid_list"
,
[])
time_list
=
r
.
get
(
"data"
)
.
get
(
"time_list"
,
[])
assert
len
(
click_list
)
<=
param
[
"assert"
]
assert
len
(
paid_list
)
<=
param
[
"assert"
]
assert
len
(
time_list
)
<=
param
[
"assert"
]
test_doctor_case/web_case/test_cpc_community_diaries.py
0 → 100644
View file @
4d51f523
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
TestCpcCommunityDiaries
:
data
=
BaseRequest
()
.
api_load
(
path_setting
.
CPCCOMMUNITYDIARIES
)
cpccommunitydiaries_case
,
cpccommunitydiaries_data
=
get_ids
(
data
,
"cpc_community_diaries"
)
@pytest.mark.parametrize
(
"param"
,
cpccommunitydiaries_data
,
ids
=
cpccommunitydiaries_case
)
def
test_cpc_community_diaries
(
self
,
param
):
'''点点通-概览'''
r
=
web_request
()
.
cpc_community_diaries
()
if
r
[
"error"
]
==
0
:
diaries
=
r
.
get
(
"data"
)
.
get
(
"diaries"
,
[])
assert
len
(
diaries
)
>=
param
[
"assert"
]
test_doctor_data/web_data/cpc_community_data_info.yaml
0 → 100644
View file @
4d51f523
cpc_community_data_info
:
#点点通内容-数据统计case
-
case
:
"
点点通内容-数据统计"
diary_id
:
15604767
start_time
:
"
2021-07-02"
end_time
:
"
2021-07-12"
assert
:
13
test_doctor_data/web_data/cpc_community_diaries.yaml
0 → 100644
View file @
4d51f523
cpc_community_diaries
:
#点点通内容-数据统计-内容case
-
case
:
"
点点通内容-数据统计-内容"
#doctor_user_id: "602329"
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