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
690801fd
Commit
690801fd
authored
Jun 11, 2021
by
陈雪
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
编辑商品
parent
7171bf3d
Show whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
140 additions
and
24 deletions
+140
-24
web2_request.py
all_doctor_api/web2_request.py
+8
-0
web2_request.yaml
all_doctor_api/web2_request.yaml
+14
-12
web_request.py
all_doctor_api/web_request.py
+29
-10
web_request.yaml
all_doctor_api/web_request.yaml
+27
-0
host.yaml
host.yaml
+2
-2
base_request.py
in_common/base_request.py
+1
-0
path_setting.py
path_setting.py
+4
-0
test_service_deletelist.py
test_doctor_case/web2_case/test_service_deletelist.py
+21
-0
test_service_all.py
test_doctor_case/web_case/test_service_all.py
+21
-0
service_deletelist.yaml
test_doctor_data/web2_data/service_deletelist.yaml
+7
-0
service_all.yaml
test_doctor_data/web_data/service_all.yaml
+6
-0
No files found.
all_doctor_api/web2_request.py
View file @
690801fd
...
...
@@ -40,6 +40,12 @@ class web2_request(BaseRequest):
self
.
params
[
"csrfmiddlewaretoken"
]
=
csrfmiddlewaretoken
return
self
.
api_send
(
self
.
SERVICE_URL
[
"service_delete"
])
def
service_deletelist
(
self
,
page
):
#我的商品-商品回收站
self
.
params
[
"page"
]
=
page
return
self
.
api_send
(
self
.
SERVICE_URL
[
"service_deletelist"
])
if
__name__
==
'__main__'
:
print
(
web2_request
()
.
service_list
(
"1"
,
"10"
,
"-1"
,
"-1"
))
...
...
@@ -47,3 +53,5 @@ if __name__ == '__main__':
print
(
web2_request
()
.
servicereview_option
(
"209989"
,
"1"
,
"PC8uTySuxipukIMuqNV1OPB376C2ZZ3g"
))
print
(
web2_request
()
.
tag_all
())
print
(
web2_request
()
.
service_delete
(
"1"
,
"209863"
,
"PC8uTySuxipukIMuqNV1OPB376C2ZZ3g"
))
print
(
web2_request
()
.
service_deletelist
(
"1"
))
#商品回收站
all_doctor_api/web2_request.yaml
View file @
690801fd
...
...
@@ -6,10 +6,7 @@ service_list:
pagesize
:
${pagesize}
is_online
:
${is_online}
extra_filter_choice
:
${extra_filter_choice}
data
:
phone_num
:
${phone_num}
vfc_code
:
${vfc_code}
face_token
:
${face_token}
data
:
{}
json
:
{}
isLogin
:
1
...
...
@@ -21,10 +18,7 @@ service_review_list:
page
:
${page}
pagesize
:
${pagesize}
type
:
${type}
data
:
phone_num
:
${phone_num}
vfc_code
:
${vfc_code}
face_token
:
${face_token}
data
:
{}
json
:
{}
isLogin
:
1
...
...
@@ -37,9 +31,6 @@ servicereview_option:
id
:
${id}
type
:
${type}
csrfmiddlewaretoken
:
${csrfmiddlewaretoken}
phone_num
:
${phone_num}
vfc_code
:
${vfc_code}
face_token
:
${face_token}
json
:
{}
isLogin
:
1
...
...
@@ -55,10 +46,20 @@ tag_all:
service_delete
:
method
:
POST
url
:
/api/web2/service/delete
param
:
{}
param
s
:
{}
data
:
is_delete
:
${is_delete}
service_register_id
:
${service_register_id}
csrfmiddlewaretoken
:
${csrfmiddlewaretoken}
json
:
{}
isLogin
:
1
service_deletelist
:
method
:
get
url
:
/api/web2/service/delete/list
params
:
page
:
${page}
data
:
{}
json
:
{}
isLogin
:
1
\ No newline at end of file
all_doctor_api/web_request.py
View file @
690801fd
...
...
@@ -40,15 +40,33 @@ class web_request(BaseRequest):
self
.
params
[
"doctor_user_id"
]
=
doctor_user_id
return
self
.
api_send
(
self
.
ACCOUNT_URL
[
"conversation_coupon"
])
def
service_all
(
self
):
return
self
.
api_send
(
self
.
ACCOUNT_URL
[
"service_all"
])
def
file_upload
(
self
,
img_type
,
csrfmiddlewaretoken
,
id
,
name
,
type
,
lastModifiedDate
,
size
,
file
):
self
.
params
[
"img_type"
]
=
img_type
self
.
params
[
"csrfmiddlewaretoken"
]
=
csrfmiddlewaretoken
self
.
params
[
"id"
]
=
id
self
.
params
[
"name"
]
=
name
self
.
params
[
"type"
]
=
type
self
.
params
[
"lastModifiedDate"
]
=
lastModifiedDate
self
.
params
[
"size"
]
=
size
self
.
params
[
"file"
]
=
file
return
self
.
api_send
(
self
.
ACCOUNT_URL
[
"file_upload"
])
if
__name__
==
'__main__'
:
print
(
web_request
()
.
account_unreadbadgecount
())
print
(
web_request
()
.
article_videotoken
())
print
(
web_request
()
.
doctor_submechanisms
())
print
(
web_request
()
.
service_offline
(
"209992"
,
"PC8uTySuxipukIMuqNV1OPB376C2ZZ3g"
))
print
(
web_request
()
.
conversation
(
0
,
1
))
print
(
web_request
()
.
conversation_unread_list
(
1
))
print
(
web_request
()
.
service
())
print
(
"发送"
)
print
(
web_request
()
.
conversation_diary
(
602329
))
print
(
web_request
()
.
conversation_coupon
(
602329
))
# print(web_request().account_unreadbadgecount())
# print(web_request().article_videotoken())
# print(web_request().doctor_submechanisms())
# print(web_request().service_offline("209992", "PC8uTySuxipukIMuqNV1OPB376C2ZZ3g"))
# print(web_request().conversation(0, 1))
# print(web_request().conversation_unread_list(1))
# print(web_request().service())
# print("发送")
# print(web_request().conversation_diary(602329))
# 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)"
))
\ No newline at end of file
all_doctor_api/web_request.yaml
View file @
690801fd
...
...
@@ -81,3 +81,29 @@ conversation_coupon:
data
:
{}
json
:
{}
isLogin
:
1
#需要登录
service_all
:
method
:
get
url
:
/api/web/service/all
params
:
{}
data
:
{}
json
:
{}
isLogin
:
1
file_upload
:
method
:
post
url
:
/api/web/file/upload
param
:
{}
data
:
img_type
:
${img_type}
csrfmiddlewaretoken
:
${csrfmiddlewaretoken}
id
:
${id}
name
:
${name}
type
:
${type}
lastModifiedDate
:
${lastModifiedDate}
size
:
${size}
file
:
${file}
json
:
{}
isLogin
:
1
\ No newline at end of file
host.yaml
View file @
690801fd
develop_host
:
backend
:
http://backend.paas-develop.env
#
doctor: http://doctor.paas-develop.env
#
backend: http://backend.paas-develop.env
doctor
:
http://doctor.paas-develop.env
# backend: https://backend.igengmei.com
in_common/base_request.py
View file @
690801fd
...
...
@@ -72,6 +72,7 @@ class BaseRequest:
# proxies={"http":"172.30.9.226:8888"}
)
print
(
"0000000"
,
r
)
return
r
.
json
()
# 随机生成trace_id
...
...
path_setting.py
View file @
690801fd
...
...
@@ -60,7 +60,11 @@ DELETE_DATA=os.path.join(BASE_DIR, "backend_auto/test_doctor_data/web2_data", "s
#医生后台-编辑可标准化商品
PROPERTIES_DATA
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_doctor_data/glmer_data"
,
"tag_properties.yaml"
)
#医生后台-商品回收站
DELETELIST_DATA
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_doctor_data/web2_data"
,
"service_deletelist.yaml"
)
#医生后台-上线商品、编辑商品
SERVICEALL_DATA
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_doctor_data/web_data"
,
"service_all.yaml"
)
#搜索首页-热门搜索
KEYWORDS_CONFIG
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/all_backend_api"
,
"search_request.yaml"
)
...
...
test_doctor_case/web2_case/test_service_deletelist.py
0 → 100644
View file @
690801fd
import
pytest
import
path_setting
from
all_doctor_api.web2_request
import
web2_request
from
ids_list
import
get_ids
from
in_common.base_request
import
BaseRequest
class
TestServiceDeletelist
:
service_deletelist
=
BaseRequest
()
.
api_load
(
path_setting
.
DELETELIST_DATA
)
ServiceDeletelist_case
,
ServiceDeletelist_data
=
get_ids
(
service_deletelist
,
"service_deletelist"
)
@pytest.mark.parametrize
(
"params"
,
ServiceDeletelist_data
,
ids
=
ServiceDeletelist_case
)
def
test_ServiceDeletelist
(
self
,
params
):
r
=
web2_request
()
.
service_deletelist
(
params
[
'page'
])
print
(
"======"
,
r
)
# if r["error"] == 0:
# assert r["error"] == params["assert"]
test_doctor_case/web_case/test_service_all.py
0 → 100644
View file @
690801fd
import
pytest
import
path_setting
from
all_doctor_api.web_request
import
web_request
from
ids_list
import
get_ids
from
in_common.base_request
import
BaseRequest
class
TestServiceAll
:
service_all
=
BaseRequest
()
.
api_load
(
path_setting
.
SERVICEALL_DATA
)
ServiceAll_case
,
ServiceAll_data
=
get_ids
(
service_all
,
"service_all"
)
@pytest.mark.parametrize
(
"param"
,
ServiceAll_data
,
ids
=
ServiceAll_case
)
def
test_ServiceAll
(
self
,
param
):
r
=
web_request
()
.
service_all
()
print
(
"====="
,
r
)
if
r
[
"error"
]
==
0
:
assert
r
[
"error"
]
==
param
[
"assert"
]
\ No newline at end of file
test_doctor_data/web2_data/service_deletelist.yaml
0 → 100644
View file @
690801fd
service_deletelist
:
#我的商品-商品回收站
-
case
:
"
我的商品-商品回收站"
page
:
"
1"
assert
:
0
\ No newline at end of file
test_doctor_data/web_data/service_all.yaml
0 → 100644
View file @
690801fd
service_all
:
-
case
:
"
编辑商品、上线商品"
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