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
68ea1ed6
Commit
68ea1ed6
authored
May 21, 2021
by
edz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add 商品审核-商品查看
parent
7de260ff
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
85 additions
and
15 deletions
+85
-15
accounts_request.yaml
all_backend_api/accounts_request.yaml
+1
-1
web2_request.py
all_doctor_api/web2_request.py
+12
-2
web2_request.yaml
all_doctor_api/web2_request.yaml
+20
-1
host.yaml
host.yaml
+1
-1
path_setting.py
path_setting.py
+3
-5
test_service_list.py
test_doctor_case/web2_case/test_service_list.py
+7
-4
test_service_review_list.py
test_doctor_case/web2_case/test_service_review_list.py
+22
-0
service_list.yaml
test_doctor_data/web2_data/service_list.yaml
+11
-1
service_review_list.yaml
test_doctor_data/web2_data/service_review_list.yaml
+8
-0
No files found.
all_backend_api/accounts_request.yaml
View file @
68ea1ed6
password
:
password
:
method
:
post
url
:
/api/accounts/login/password
params
:
...
...
all_doctor_api/web2_request.py
View file @
68ea1ed6
...
...
@@ -4,14 +4,23 @@ from in_common.base_request import BaseRequest
class
web2_request
(
BaseRequest
):
def
__init__
(
self
):
self
.
data
=
self
.
api_load
(
path_setting
.
SERVICE_URL
)
self
.
SERVICE_URL
=
self
.
api_load
(
path_setting
.
SERVICE_URL
)
# self.SERVICE_REVIEW_URL = self.api_load(path_setting.SERVICE_REVIEW_URL)
def
service_list
(
self
,
page
,
pagesize
,
is_online
):
self
.
params
[
"page"
]
=
page
self
.
params
[
"pagesize"
]
=
pagesize
self
.
params
[
"is_online"
]
=
is_online
return
self
.
api_send
(
self
.
SERVICE_URL
[
"service_list"
])
def
service_review_list
(
self
,
page
,
pagesize
,
type
):
self
.
params
[
"page"
]
=
page
self
.
params
[
"pagesize"
]
=
pagesize
self
.
params
[
"type"
]
=
type
return
self
.
api_send
(
self
.
SERVICE_URL
[
"service_review_list"
])
return
self
.
api_send
(
self
.
data
[
"service_list"
])
if
__name__
==
'__main__'
:
print
(
web2_request
()
.
service_list
(
"1"
,
"10"
,
"-1"
))
# print(web2_request().service_review_list("1", "10", "0"))
\ No newline at end of file
all_doctor_api/web2_request.yaml
View file @
68ea1ed6
...
...
@@ -5,6 +5,24 @@ service_list:
page
:
${page}
pagesize
:
${pagesize}
is_online
:
${is_online}
data
:
{}
data
:
phone_num
:
${phone_num}
vfc_code
:
${vfc_code}
face_token
:
${face_token}
json
:
{}
isLogin
:
1
service_review_list
:
method
:
get
url
:
/api/web2/service/review/list
params
:
page
:
${page}
pagesize
:
${pagesize}
type
:
${type}
data
:
phone_num
:
${phone_num}
vfc_code
:
${vfc_code}
face_token
:
${face_token}
json
:
{}
isLogin
:
1
\ No newline at end of file
host.yaml
View file @
68ea1ed6
develop_host
:
backend
:
http://backend.paas-develop.env
#
backend: http://backend.paas-develop.env
doctor
:
http://doctor.paas-develop.env
path_setting.py
View file @
68ea1ed6
...
...
@@ -18,20 +18,18 @@ DIARY_DATA = os.path.join(BASE_DIR, "backend_auto/test_backend_data/account_data
KEYWORDS_CONFIG
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/all_backend_api"
,
"search_request.yaml"
)
KEYWORDS
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_backend_data/search_data"
,
"keywords.yaml"
)
#医生后台-我的商品
SERVICE_DATA
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_doctor_data/web2_data"
,
"service_list.yaml"
)
SERVICE_URL
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/all_doctor_api"
,
"web2_request.yaml"
)
#医生后台-商品审核
SERVICE_REVIEW_DATA
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_doctor_data/web2_data"
,
"service_review_list.yaml"
)
#搜索首页-热门搜索
KEYWORDS_CONFIG
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/all_backend_api"
,
"search_request.yaml"
)
KEYWORDS
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_backend_data/search_data"
,
"keywords.yaml"
)
SERVICE_DATA
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_doctor_data/web2_data"
,
"service_list.yaml"
)
SERVICE_URL
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/all_doctor_api"
,
"web2_request.yaml"
)
# 首页灰度v9,精选tab
FEED_INDEXV9_CONFIG
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/all_backend_api"
,
"feed_request.yaml"
)
FEED_INDEXV9_DATA
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_backend_data/feed_data"
,
"index_v9.yaml"
)
...
...
test_doctor_case/web2_case/test_service_list.py
View file @
68ea1ed6
...
...
@@ -7,17 +7,20 @@ from in_common.base_request import BaseRequest
class
TestServiceList
:
data
=
BaseRequest
()
.
api_load
(
path_setting
.
SERVICE_DATA
)
ServiceList_case
,
ServiceList_data
=
get_ids
(
data
,
"service_list"
)
service_list
=
BaseRequest
()
.
api_load
(
path_setting
.
SERVICE_DATA
)
ServiceList_case
,
ServiceList_data
=
get_ids
(
service_list
,
"service_list"
)
print
(
"-----"
,
service_list
)
@pytest.mark.parametrize
(
"params"
,
ServiceList_data
,
ids
=
ServiceList_case
)
def
test_ServiceList
(
self
,
params
):
r
=
web2_request
()
.
service_list
(
params
[
'page'
],
params
[
'pagesize'
],
params
[
'is_online'
])
print
(
"======"
,
r
)
if
r
[
"error"
]
==
0
:
assert
r
[
"data"
][
"page"
]
==
params
[
"assert"
]
elif
r
[
"error"
]
==
1
:
assert
r
[
"message"
]
==
params
[
"assert"
]
# else:
# assert r['error'] == 0
test_doctor_case/web2_case/test_service_review_list.py
0 → 100644
View file @
68ea1ed6
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
TestServiceReviewList
:
service_review_list
=
BaseRequest
()
.
api_load
(
path_setting
.
SERVICE_REVIEW_DATA
)
ServiceReviewList_case
,
ServiceReviewList_data
=
get_ids
(
service_review_list
,
"service_review_list"
)
@pytest.mark.parametrize
(
"params"
,
ServiceReviewList_data
,
ids
=
ServiceReviewList_case
)
def
test_ServiceReviewList
(
self
,
params
):
r
=
web2_request
()
.
service_review_list
(
params
[
'page'
],
params
[
'pagesize'
],
params
[
'type'
])
if
r
[
"error"
]
==
0
:
assert
r
[
"data"
][
"page"
]
==
params
[
"assert"
]
elif
r
[
"error"
]
==
1
:
assert
r
[
"message"
]
==
params
[
"assert"
]
\ No newline at end of file
test_doctor_data/web2_data/service_list.yaml
View file @
68ea1ed6
service_list
:
#有数据返回
-
case
:
"
数据
"
case
:
"
我的商品-有数据返回
"
page
:
"
1"
pagesize
:
"
10"
is_online
:
"
-1"
assert
:
1
service_review_list
:
#有数据返回
-
case
:
"
商品审核-有数据返回"
page
:
"
1"
pagesize
:
"
10"
type
:
"
0"
assert
:
1
test_doctor_data/web2_data/service_review_list.yaml
0 → 100644
View file @
68ea1ed6
service_review_list
:
#有数据返回
-
case
:
"
商品审核-有数据返回"
page
:
"
1"
pagesize
:
"
10"
type
:
"
0"
assert
:
1
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