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
e166762b
Commit
e166762b
authored
Jun 01, 2021
by
张淑琴
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
恢复文件
parent
1158b950
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
54 additions
and
0 deletions
+54
-0
test_private_conversation.py
...nd_case/private_conversation/test_private_conversation.py
+25
-0
private_conversation.yaml
..._data/private_conversation_data/private_conversation.yaml
+29
-0
No files found.
test_backend_case/private_conversation/test_private_conversation.py
0 → 100644
View file @
e166762b
import
pytest
from
ids_list
import
get_ids
import
path_setting
from
in_common.base_request
import
BaseRequest
from
all_backend_api.private_conversation_request
import
private_conversation_request
class
TestPrivateConversation
:
data
=
BaseRequest
()
.
api_load
(
path_setting
.
PRIVATE_CONVERSATION
)
privateconversation_case
,
privateconversation_data
=
get_ids
(
data
,
"private_conversation"
)
@pytest.mark.parametrize
(
"param"
,
privateconversation_data
,
ids
=
privateconversation_case
)
def
test_private_conversation
(
self
,
param
):
r
=
private_conversation_request
()
.
private_conversation
(
param
[
"content"
],
param
[
"target_uid"
],
param
[
"referrer"
],
param
[
"referrer_id"
],
param
[
"is_system"
],
param
[
"quick_consultation_id"
],
param
[
"diary_id"
],
param
[
"from_live"
])
print
(
r
)
if
r
[
"error"
]
==
0
:
assert
r
[
"message"
]
==
param
[
"assert_message"
]
assert
r
[
"data"
][
"text"
]
==
param
[
"assert_text"
]
if
r
[
"error"
]
==
21001
:
assert
r
[
"message"
]
==
param
[
"assert_message1"
]
\ No newline at end of file
test_backend_data/private_conversation_data/private_conversation.yaml
0 → 100644
View file @
e166762b
private_conversation
:
#验证成功case
-
case
:
"
发送消息成功"
content
:
"
你好"
target_uid
:
35874935
referrer
:
"
message_home"
referrer_id
:
"
"
is_system
:
0
quick_consultation_id
:
"
"
diary_id
:
"
"
from_live
:
"
"
assert_message
:
"
消息发送成功"
assert_text
:
"
你好"
#验证成功case
-
case
:
"
发送消息成功"
content
:
"
你好"
target_uid
:
358749351
referrer
:
"
message_home"
referrer_id
:
"
"
is_system
:
0
quick_consultation_id
:
"
"
diary_id
:
"
"
from_live
:
"
"
assert_message1
:
"
请登录"
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