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
82d3031e
Commit
82d3031e
authored
Apr 23, 2021
by
张淑琴
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
消息
parent
9dd8506d
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
52 additions
and
3 deletions
+52
-3
im_request.py
all_backend_api/im_request.py
+8
-2
im_request.yaml
all_backend_api/im_request.yaml
+15
-0
path_setting.py
path_setting.py
+1
-1
test_auto_msg.py
test_backend_case/im_case/test_auto_msg.py
+18
-0
auto_msg.yaml
test_backend_data/im_data/auto_msg.yaml
+10
-0
No files found.
all_backend_api/im_request.py
View file @
82d3031e
...
...
@@ -12,13 +12,19 @@ class im_request(BaseRequest):
self
.
params
[
"conversation_type"
]
=
conversation_type
self
.
params
[
"end_msg_id"
]
=
end_msg_id
self
.
params
[
"referrer"
]
=
referrer
return
self
.
api_send
(
self
.
data
[
"conversation_detail"
])
def
auto_msg
(
self
,
version
,
uqid
,
trace_id
,
conversation_id
):
self
.
params
[
"version"
]
=
version
self
.
params
[
"uqid"
]
=
uqid
self
.
params
[
"trace_id"
]
=
trace_id
self
.
params
[
"conversation_id"
]
=
conversation_id
return
self
.
api_send
(
self
.
data
[
"auto_msg"
])
if
__name__
==
'__main__'
:
print
(
im_request
()
.
conversation_detail
(
"beijing"
,
0
,
4
,
0
,
"message_home"
))
print
(
"第二个接口"
)
print
(
im_request
()
.
auto_msg
(
"7.42.2"
,
"1B519701-A4F5-453E-9D99-140B5AF697A0"
,
"2021/04/22/1722/70a1791606d5"
,
368
))
...
...
all_backend_api/im_request.yaml
View file @
82d3031e
...
...
@@ -9,5 +9,19 @@ conversation_detail:
referrer
:
${referrer}
data
:
{}
json
:
{}
isLogin
:
1
#需要登录的接口
auto_msg
:
method
:
post
url
:
/api/im/auto_msg
params
:
version
:
${version}
trace_id
:
${trace_id}
uqidd
:
${uqid}
data
:
conversation_id
:
${conversation_id}
json
:
{}
isLogin
:
1
#需要登录的接口
\ No newline at end of file
path_setting.py
View file @
82d3031e
...
...
@@ -78,7 +78,7 @@ MESSAGE_READ = os.path.join(BASE_DIR, "backend_auto/test_backend_data/conversati
#咨询顾问
CONVERSATION_DETAIL_CONFIG
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/all_backend_api"
,
"im_request.yaml"
)
CONVERSATION_DETAIL
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_backend_data/im_data"
,
"conversation_detail.yaml"
)
AUTO_MSG
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_backend_data/im_data"
,
"auto_msg.yaml"
)
#消息页未读数
UNREAD_CONFIG
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/all_backend_api"
,
"notification_request.yaml"
)
UNREAD
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_backend_data/notification_data"
,
"unread.yaml"
)
...
...
test_backend_case/im_case/test_auto_msg.py
0 → 100644
View file @
82d3031e
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
TestConversationDetail
:
data
=
BaseRequest
()
.
api_load
(
path_setting
.
AUTO_MSG
)
automsg_case
,
automsg_data
=
get_ids
(
data
,
"auto_msg"
)
@pytest.mark.parametrize
(
"param"
,
automsg_data
,
ids
=
automsg_case
)
def
test_conversation_detail
(
self
,
param
):
r
=
im_request
()
.
auto_msg
(
param
[
"version"
],
param
[
"uqid"
],
param
[
"trace_id"
],
param
[
"conversation_id"
])
if
r
[
"error"
]
==
0
:
assert
r
[
"data"
][
"send_result"
]
==
param
[
"assert"
]
test_backend_data/im_data/auto_msg.yaml
0 → 100644
View file @
82d3031e
auto_msg
:
#验证成功case
-
case
:
"
请求成功,有数据返回"
version
:
7.42
uqid
:
"
1B519701-A4F5-453E-9D99-140B5AF697A0"
trace_id
:
"
2021/04/22/1722/70a1791606d5"
conversation_id
:
368
assert
:
True
\ 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