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
b35c8351
Commit
b35c8351
authored
Jun 03, 2021
by
张淑琴
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
未读私信列表
parent
22107234
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
50 additions
and
2 deletions
+50
-2
web_request.py
all_doctor_api/web_request.py
+6
-1
web_request.yaml
all_doctor_api/web_request.yaml
+9
-0
path_setting.py
path_setting.py
+2
-0
test_conversation.py
test_doctor_case/web_case/test_conversation.py
+1
-1
test_conversation_unread_list.py
test_doctor_case/web_case/test_conversation_unread_list.py
+22
-0
conversation_unread_list.yaml
test_doctor_data/web_data/conversation_unread_list.yaml
+10
-0
No files found.
all_doctor_api/web_request.py
View file @
b35c8351
...
@@ -19,7 +19,7 @@ class web_request(BaseRequest):
...
@@ -19,7 +19,7 @@ class web_request(BaseRequest):
def
conversation
(
self
,
is_star
,
page
):
def
conversation
(
self
,
is_star
,
page
):
self
.
params
[
"is_star"
]
=
is_star
self
.
params
[
"is_star"
]
=
is_star
self
.
params
[
"page"
]
=
page
self
.
params
[
"page"
]
=
page
return
self
.
api_send
(
self
.
data
[
"conversation"
])
return
self
.
api_send
(
self
.
ACCOUNT_URL
[
"conversation"
])
def
service_offline
(
self
,
id
,
csrfmiddlewaretoken
):
def
service_offline
(
self
,
id
,
csrfmiddlewaretoken
):
...
@@ -27,6 +27,10 @@ class web_request(BaseRequest):
...
@@ -27,6 +27,10 @@ class web_request(BaseRequest):
self
.
params
[
"csrfmiddlewaretoken"
]
=
csrfmiddlewaretoken
self
.
params
[
"csrfmiddlewaretoken"
]
=
csrfmiddlewaretoken
return
self
.
api_send
(
self
.
ACCOUNT_URL
[
"service_offline"
])
return
self
.
api_send
(
self
.
ACCOUNT_URL
[
"service_offline"
])
def
conversation_unread_list
(
self
,
page
):
self
.
params
[
"page"
]
=
page
return
self
.
api_send
(
self
.
ACCOUNT_URL
[
"conversation_unread_list"
])
...
@@ -39,4 +43,5 @@ if __name__ == '__main__':
...
@@ -39,4 +43,5 @@ if __name__ == '__main__':
print
(
"列表页"
)
print
(
"列表页"
)
print
(
web_request
()
.
conversation
(
0
,
1
))
print
(
web_request
()
.
conversation
(
0
,
1
))
print
(
web_request
()
.
service_offline
(
"209992"
,
"PC8uTySuxipukIMuqNV1OPB376C2ZZ3g"
))
print
(
web_request
()
.
service_offline
(
"209992"
,
"PC8uTySuxipukIMuqNV1OPB376C2ZZ3g"
))
print
(
web_request
()
.
conversation_unread_list
(
1
))
all_doctor_api/web_request.yaml
View file @
b35c8351
...
@@ -48,3 +48,12 @@ service_offline:
...
@@ -48,3 +48,12 @@ service_offline:
json
:
{}
json
:
{}
isLogin
:
1
isLogin
:
1
conversation_unread_list
:
method
:
get
url
:
/api/web/conversation/unread_list
param
:
page
:
${page}
data
:
{}
json
:
{}
isLogin
:
1
#需要登录
path_setting.py
View file @
b35c8351
...
@@ -177,6 +177,8 @@ REPLY_ANSWER = os.path.join(BASE_DIR, "backend_auto/test_backend_data/question_d
...
@@ -177,6 +177,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"
)
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"
)
if
__name__
==
'__main__'
:
if
__name__
==
'__main__'
:
...
...
test_doctor_case/web_case/test_conversation.py
View file @
b35c8351
...
@@ -13,7 +13,7 @@ class TestConversation:
...
@@ -13,7 +13,7 @@ class TestConversation:
@pytest.mark.parametrize
(
"param"
,
conversation_data
,
ids
=
conversation_case
)
@pytest.mark.parametrize
(
"param"
,
conversation_data
,
ids
=
conversation_case
)
def
test_conversation
(
self
,
param
):
def
test_conversation
(
self
,
param
):
'''私信列表'''
'''
全部
私信列表'''
r
=
web_request
()
.
conversation
(
param
[
"is_star"
],
param
[
"page"
])
r
=
web_request
()
.
conversation
(
param
[
"is_star"
],
param
[
"page"
])
if
r
[
"error"
]
==
0
:
if
r
[
"error"
]
==
0
:
conversation
=
r
.
get
(
"data"
)
.
get
(
"conversation"
,
[])
conversation
=
r
.
get
(
"data"
)
.
get
(
"conversation"
,
[])
...
...
test_doctor_case/web_case/test_conversation_unread_list.py
0 → 100644
View file @
b35c8351
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
TestConversationUnreadList
:
data
=
BaseRequest
()
.
api_load
(
path_setting
.
CONVERSATION
)
unreadlist_case
,
unreadlist_data
=
get_ids
(
data
,
"conversation"
)
@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"
,
[])
assert
len
(
conversation
)
<=
param
[
"assert"
]
assert
r
[
"data"
][
"size"
]
<=
param
[
"assert_size"
]
test_doctor_data/web_data/conversation_unread_list.yaml
0 → 100644
View file @
b35c8351
conversation_unread_list
:
#全部私信case
-
case
:
"
请求成功,有未读消息"
page
:
1
assert_size
:
10
assert
:
10
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