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
05b5dced
Commit
05b5dced
authored
Jun 03, 2021
by
张淑琴
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
发送商品
parent
b35c8351
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
47 additions
and
4 deletions
+47
-4
web_request.py
all_doctor_api/web_request.py
+4
-0
web_request.yaml
all_doctor_api/web_request.yaml
+7
-0
path_setting.py
path_setting.py
+2
-0
test_conversation_unread_list.py
test_doctor_case/web_case/test_conversation_unread_list.py
+3
-3
test_service.py
test_doctor_case/web_case/test_service.py
+22
-0
conversation_unread_list.yaml
test_doctor_data/web_data/conversation_unread_list.yaml
+1
-1
service.yaml
test_doctor_data/web_data/service.yaml
+8
-0
No files found.
all_doctor_api/web_request.py
View file @
05b5dced
...
...
@@ -31,6 +31,9 @@ class web_request(BaseRequest):
self
.
params
[
"page"
]
=
page
return
self
.
api_send
(
self
.
ACCOUNT_URL
[
"conversation_unread_list"
])
def
service
(
self
):
return
self
.
api_send
(
self
.
ACCOUNT_URL
[
"service"
])
...
...
@@ -44,4 +47,5 @@ if __name__ == '__main__':
print
(
web_request
()
.
conversation
(
0
,
1
))
print
(
web_request
()
.
service_offline
(
"209992"
,
"PC8uTySuxipukIMuqNV1OPB376C2ZZ3g"
))
print
(
web_request
()
.
conversation_unread_list
(
1
))
print
(
web_request
()
.
service
())
all_doctor_api/web_request.yaml
View file @
05b5dced
...
...
@@ -57,3 +57,10 @@ conversation_unread_list:
json
:
{}
isLogin
:
1
#需要登录
service
:
method
:
get
url
:
/api/web/service
param
:
{}
data
:
{}
json
:
{}
isLogin
:
1
#需要登录
path_setting.py
View file @
05b5dced
...
...
@@ -179,6 +179,8 @@ REPLY_ANSWER = os.path.join(BASE_DIR, "backend_auto/test_backend_data/question_d
CONVERSATION
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_doctor_data/web_data"
,
"conversation.yaml"
)
#医生后台--未读私信列表
CONVERSATIONUNREADLIST
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_doctor_data/web_data"
,
"conversation_unread_list.yaml"
)
#医生后台--点击发送商品按钮
SERVICE
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_doctor_data/web_data"
,
"service.yaml"
)
if
__name__
==
'__main__'
:
...
...
test_doctor_case/web_case/test_conversation_unread_list.py
View file @
05b5dced
...
...
@@ -7,13 +7,13 @@ from all_doctor_api.web_request import web_request
class
TestConversationUnreadList
:
data
=
BaseRequest
()
.
api_load
(
path_setting
.
CONVERSATION
)
unreadlist_case
,
unreadlist_data
=
get_ids
(
data
,
"conversation"
)
data
=
BaseRequest
()
.
api_load
(
path_setting
.
CONVERSATION
UNREADLIST
)
unreadlist_case
,
unreadlist_data
=
get_ids
(
data
,
"conversation
_unread_list
"
)
@pytest.mark.parametrize
(
"param"
,
unreadlist_data
,
ids
=
unreadlist_case
)
def
test_conversation_unread_list
(
self
,
param
):
'''
全部
私信列表'''
'''
未读
私信列表'''
r
=
web_request
()
.
conversation_unread_list
(
param
[
"page"
])
if
r
[
"error"
]
==
0
:
conversation
=
r
.
get
(
"data"
)
.
get
(
"conversation"
,
[])
...
...
test_doctor_case/web_case/test_service.py
0 → 100644
View file @
05b5dced
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
TestService
:
data
=
BaseRequest
()
.
api_load
(
path_setting
.
SERVICE
)
service_case
,
service_data
=
get_ids
(
data
,
"service"
)
@pytest.mark.parametrize
(
"param"
,
service_data
,
ids
=
service_case
)
def
test_service
(
self
,
param
):
'''未读私信列表'''
r
=
web_request
()
.
service
()
if
r
[
"error"
]
==
0
:
data
=
r
.
get
(
"data"
)
.
get
(
"data"
,
[])
assert
len
(
data
)
<=
param
[
"assert"
]
assert
r
[
"data"
][
"size"
]
<=
param
[
"assert_size"
]
test_doctor_data/web_data/conversation_unread_list.yaml
View file @
05b5dced
conversation_unread_list
:
#
全部
私信case
#
未读
私信case
-
case
:
"
请求成功,有未读消息"
page
:
1
...
...
test_doctor_data/web_data/service.yaml
0 → 100644
View file @
05b5dced
service
:
#私信点击发送商品case
-
case
:
"
点击私信发送商品按钮"
#page: 1
assert_size
:
10
assert
:
10
\ 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