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
f89d7b9b
Commit
f89d7b9b
authored
Jun 01, 2021
by
张淑琴
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
消息内容
parent
a65b5aed
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
48 additions
and
1 deletion
+48
-1
conversation_request.py
all_backend_api/conversation_request.py
+6
-1
conversation_request.yaml
all_backend_api/conversation_request.yaml
+13
-0
path_setting.py
path_setting.py
+1
-0
test_detail_messageid.py
test_backend_case/conversation_case/test_detail_messageid.py
+19
-0
detail_messageid.yaml
test_backend_data/conversation_data/detail_messageid.yaml
+9
-0
No files found.
all_backend_api/conversation_request.py
View file @
f89d7b9b
...
...
@@ -9,13 +9,18 @@ class conversation_request(BaseRequest):
def
message_read
(
self
,
current_city_id
,
release
,
message_ids
):
self
.
params
[
"current_city_id"
]
=
current_city_id
self
.
params
[
"release"
]
=
release
#self.params["uqid"] = uqid
self
.
params
[
"message_ids"
]
=
message_ids
return
self
.
api_send
(
self
.
messageread
[
"message_read"
])
def
detail_messageid
(
self
,
os_version
,
last_msg_id
,
offset_msg_id
):
self
.
params
[
"os_version"
]
=
os_version
self
.
params
[
"last_msg_id"
]
=
last_msg_id
self
.
params
[
"offset_msg_id"
]
=
offset_msg_id
return
self
.
api_send
(
self
.
messageread
[
"detail_messageid"
])
if
__name__
==
'__main__'
:
print
(
conversation_request
()
.
message_read
(
"beijing"
,
1
,
'[10622,10626,10646,10651]'
))
print
(
conversation_request
()
.
detail_messageid
(
10
,
0
,
0
))
...
...
all_backend_api/conversation_request.yaml
View file @
f89d7b9b
...
...
@@ -8,5 +8,17 @@ message_read:
data
:
message_ids
:
${message_ids}
json
:
{}
isLogin
:
1
#需要登录的接口
detail_messageid
:
method
:
get
url
:
/api/conversation/detail/602329_33910245/
params
:
os_version
:
${os_version}
last_msg_id
:
${last_msg_id}
offset_msg_id
:
${offset_msg_id}
data
:
{}
json
:
{}
isLogin
:
1
#需要登录的接口
\ No newline at end of file
path_setting.py
View file @
f89d7b9b
...
...
@@ -65,6 +65,7 @@ MY_CONVERSATION = os.path.join(BASE_DIR, "backend_auto/test_backend_data/my_conv
#消息
MESSAGE_READ_CONFIG
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/all_backend_api"
,
"conversation_request.yaml"
)
MESSAGE_READ
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_backend_data/conversation_data"
,
"message_read.yaml"
)
DETAIL_MESSAGEID
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_backend_data/conversation_data"
,
"detail_messageid.yaml"
)
#消息页未读数
UNREAD_CONFIG
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/all_backend_api"
,
"notification_request.yaml"
)
...
...
test_backend_case/conversation_case/test_detail_messageid.py
0 → 100644
View file @
f89d7b9b
import
pytest
from
ids_list
import
get_ids
import
path_setting
from
in_common.base_request
import
BaseRequest
from
all_backend_api.conversation_request
import
conversation_request
class
TestDetailMessageid
:
data
=
BaseRequest
()
.
api_load
(
path_setting
.
DETAIL_MESSAGEID
)
detailmessageid_case
,
detailmessageid_data
=
get_ids
(
data
,
"detail_messageid"
)
@pytest.mark.parametrize
(
"param"
,
detailmessageid_data
,
ids
=
detailmessageid_case
)
def
test_detail_messageid
(
self
,
param
):
r
=
conversation_request
()
.
detail_messageid
(
param
[
"os_version"
],
param
[
"last_msg_id"
],
param
[
"offset_msg_id"
])
if
r
[
"error"
]
==
0
:
results
=
r
.
get
(
"data"
)
.
get
(
"results"
,
[])
assert
len
(
results
)
<=
param
[
"assert"
]
test_backend_data/conversation_data/detail_messageid.yaml
0 → 100644
View file @
f89d7b9b
detail_messageid
:
#验证成功case
-
case
:
"
私信详情页最新一页的消息内容"
os_version
:
10
last_msg_id
:
0
offset_msg_id
:
0
assert
:
20
\ 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