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
f5963a64
Commit
f5963a64
authored
Jun 16, 2021
by
张淑琴
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
概览
parent
aef627cd
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
48 additions
and
3 deletions
+48
-3
web_request.py
all_doctor_api/web_request.py
+6
-2
web_request.yaml
all_doctor_api/web_request.yaml
+9
-0
path_setting.py
path_setting.py
+2
-1
test_cpc_homepage.py
test_doctor_case/web_case/test_cpc_homepage.py
+23
-0
cpc_homepage.yaml
test_doctor_data/web_data/cpc_homepage.yaml
+8
-0
No files found.
all_doctor_api/web_request.py
View file @
f5963a64
...
...
@@ -61,6 +61,9 @@ class web_request(BaseRequest):
# self.params["size"] = size
# self.params["file"] = file
# return self.api_send(self.ACCOUNT_URL["file_upload"])
def
cpc_homepage
(
self
):
return
self
.
api_send
(
self
.
ACCOUNT_URL
[
"cpc_homepage"
])
...
...
@@ -77,4 +80,5 @@ if __name__ == '__main__':
print
(
web_request
()
.
conversation_coupon
(
602329
))
print
(
web_request
()
.
service_all
())
# print(web_request().file_upload("19","PC8uTySuxipukIMuqNV1OPB376C2ZZ3g","WU_FILE_0","lADPDg7mQdiUTiLNAZDNAZA_400_400.jpg_720x720g.jpg","image/jpeg","Mon Apr 26 2021 11:29:45 GMT+0800 (中国标准时间)","17688","(binary)"))
print
(
web_request
()
.
conversation_user_id
(
0
,
"您好"
,
602329
,
"271caac2ae1687ca0a56ee18115b8183"
,
"NLeTxEx1BOQo1zjv2us9BQ00ViMAHGpJ"
))
\ No newline at end of file
print
(
web_request
()
.
conversation_user_id
(
0
,
"您好"
,
602329
,
"271caac2ae1687ca0a56ee18115b8183"
,
"NLeTxEx1BOQo1zjv2us9BQ00ViMAHGpJ"
))
print
(
web_request
()
.
cpc_homepage
())
\ No newline at end of file
all_doctor_api/web_request.yaml
View file @
f5963a64
...
...
@@ -119,4 +119,12 @@ conversation_user_id:
t
:
${t}
csrfmiddlewaretoken
:
${csrfmiddlewaretoken}
json
:
{}
isLogin
:
1
#需要登录
cpc_homepage
:
method
:
get
url
:
/api/web/cpc/homepage
params
:
{}
data
:
{}
json
:
{}
isLogin
:
1
#需要登录
\ No newline at end of file
path_setting.py
View file @
f5963a64
...
...
@@ -274,7 +274,6 @@ PUSH_LIVE_INFO = os.path.join(BASE_DIR, "backend_auto/test_backend_data/live_dat
#商祥页-详情
JANUS_PRODUCT_DETAIL
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_backend_data/janus_data"
,
"product_detail.yaml"
)
#商祥页-sku信息
...
...
@@ -384,6 +383,8 @@ CONVERSATIONCOUPON=os.path.join(BASE_DIR, "backend_auto/test_doctor_data/web_dat
#医生后台-发送私信
CONVERSATIONUSERID
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_doctor_data/web_data"
,
"conversation_user_id.yaml"
)
#医生后台-点点通商品-概览
CPCHOMEPAGE
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_doctor_data/web_data"
,
"cpc_homepage.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_homepage.py
0 → 100644
View file @
f5963a64
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
TestCpcHomepage
:
data
=
BaseRequest
()
.
api_load
(
path_setting
.
CPCHOMEPAGE
)
cpchomepage_case
,
cpchomepage_data
=
get_ids
(
data
,
"cpc_homepage"
)
@pytest.mark.parametrize
(
"param"
,
cpchomepage_data
,
ids
=
cpchomepage_case
)
def
test_cpc_homepage
(
self
,
param
):
'''点点通-概览'''
r
=
web_request
()
.
cpc_homepage
()
if
r
[
"error"
]
==
0
:
if
r
[
"data"
][
"account"
]
<=
"0"
:
assert
r
[
"data"
][
"is_cpc"
]
==
param
[
"assert"
]
else
:
assert
r
[
"data"
][
"is_cpc"
]
==
param
[
"assert1"
]
test_doctor_data/web_data/cpc_homepage.yaml
0 → 100644
View file @
f5963a64
cpc_homepage
:
#点点通商品-概览case
-
case
:
"
点点通商品概览"
#doctor_user_id: "602329"
assert
:
False
assert_account
:
0
assert1
:
True
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