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
7418a9eb
Commit
7418a9eb
authored
Jun 01, 2021
by
张淑琴
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
恢复文件
parent
e47fcf0b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
51 additions
and
0 deletions
+51
-0
test_send_msg.py
test_backend_case/im_case/test_send_msg.py
+22
-0
send_msg.yaml
test_backend_data/im_data/send_msg.yaml
+29
-0
No files found.
test_backend_case/im_case/test_send_msg.py
0 → 100644
View file @
7418a9eb
import
pytest
from
ids_list
import
get_ids
import
path_setting
from
in_common.base_request
import
BaseRequest
from
all_backend_api.im_request
import
im_request
class
TestSendMsg
:
data
=
BaseRequest
()
.
api_load
(
path_setting
.
SEND_MSG
)
sendmsg_case
,
sendmsg_data
=
get_ids
(
data
,
"send_msg"
)
@pytest.mark.parametrize
(
"param"
,
sendmsg_data
,
ids
=
sendmsg_case
)
def
test_send_msg
(
self
,
param
):
r
=
im_request
()
.
send_msg
(
param
[
"conversation_id"
],
param
[
"is_system"
],
param
[
"referrer"
],
param
[
"referrer_id"
],
param
[
"msg_type"
],
param
[
"content"
],
param
[
"extra"
])
print
(
r
)
if
r
[
"error"
]
==
0
:
assert
r
[
"data"
][
"conversation_type"
]
==
param
[
"assert_conversation_type"
]
assert
r
[
"data"
][
"message_type"
]
==
param
[
"assert_message_type"
]
if
r
[
"error"
]
==
1
:
assert
r
[
"message"
]
==
param
[
"assert_message"
]
test_backend_data/im_data/send_msg.yaml
0 → 100644
View file @
7418a9eb
send_msg
:
#验证成功case
-
case
:
"
给咨询师发送消息成功"
#current_city_id: beijing
conversation_id
:
368
is_system
:
0
referrer
:
"
message_home"
referrer_id
:
"
"
msg_type
:
0
content
:
"
您好,我想咨询一下---"
extra
:
"
"
assert_conversation_type
:
4
assert_message_type
:
0
#验证失败case
-
case
:
"
给咨询师发送消息失败"
#current_city_id: beijing
conversation_id
:
463465
is_system
:
0
referrer
:
"
message_home"
referrer_id
:
"
"
msg_type
:
0
content
:
"
您好,我想咨询一下---"
extra
:
{}
assert_message
:
"
服务器开小差了~"
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