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
9e7ba03f
Commit
9e7ba03f
authored
Aug 02, 2021
by
edz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
直播间私信主播
parent
c5603cc1
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
49 additions
and
1 deletion
+49
-1
conversation_request.py
all_backend_api/conversation_request.py
+10
-0
conversation_request.yaml
all_backend_api/conversation_request.yaml
+13
-0
achelous_request.py
all_om_api/achelous_request.py
+1
-1
achelous_request.yaml
all_om_api/achelous_request.yaml
+1
-0
path_setting.py
path_setting.py
+2
-0
test_detail_live.py
test_backend_case/conversation_case/test_detail_live.py
+16
-0
detail_live.yaml
test_backend_data/conversation_data/detail_live.yaml
+6
-0
No files found.
all_backend_api/conversation_request.py
View file @
9e7ba03f
...
...
@@ -19,11 +19,21 @@ class conversation_request(BaseRequest):
self
.
params
[
"offset_msg_id"
]
=
offset_msg_id
return
self
.
api_send
(
self
.
messageread
[
"detail_messageid"
])
#直播间私信主播
def
detail_live
(
self
,
referrer_id
):
# self.params["referrer"] = referrer
self
.
params
[
"referrer_id"
]
=
referrer_id
# self.params["last_msg_id"] = last_msg_id
# self.params["offset_msg_id"] = offset_msg_id
return
self
.
api_send
(
self
.
messageread
[
"detail_live"
])
if
__name__
==
'__main__'
:
print
(
conversation_request
()
.
message_read
(
"beijing"
,
1
,
'[10622,10626,10646,10651]'
))
print
(
"---------"
)
print
(
conversation_request
()
.
detail_messageid
(
10
,
0
,
0
))
print
(
conversation_request
()
.
detail_live
(
737
))
...
...
all_backend_api/conversation_request.yaml
View file @
9e7ba03f
...
...
@@ -22,3 +22,16 @@ detail_messageid:
json
:
{}
isLogin
:
1
#需要登录的接口
#直播间私信主播
detail_live
:
method
:
get
url
:
/api/conversation/detail/33909791_33910245
params
:
referrer
:
${referrer}
# referrer_id: ${referrer_id}
# last_msg_id: ${last_msg_id}
# offset_msg_id: ${offset_msg_id}
data
:
{}
json
:
{}
isLogin
:
1
all_om_api/achelous_request.py
View file @
9e7ba03f
...
...
@@ -4,7 +4,7 @@ from in_common.base_request import BaseRequest
class
achelous_request
(
BaseRequest
):
def
__init__
(
self
):
self
.
data
=
self
.
api_load
(
path_setting
.
ACHELOUS_REQUEST_CONFIG
)
#直播间批量添加商品
def
batch_add_service
(
self
,
stream_id
,
service_item_ids
):
self
.
params
[
"stream_id"
]
=
stream_id
self
.
params
[
"service_item_ids"
]
=
service_item_ids
...
...
all_om_api/achelous_request.yaml
View file @
9e7ba03f
#批量添加直播间商品
batch_add_service
:
method
:
post
url
:
/achelous/live/batch_add_service
...
...
path_setting.py
View file @
9e7ba03f
...
...
@@ -305,6 +305,8 @@ DETAIL_MESSAGEID = os.path.join(BASE_DIR, "backend_auto/test_backend_data/conver
#消息
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_LIVE
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_backend_data/conversation_data"
,
"detail_live.yaml"
)
#消息页未读数
UNREAD_CONFIG
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/all_backend_api"
,
"notification_request.yaml"
)
...
...
test_backend_case/conversation_case/test_detail_live.py
0 → 100644
View file @
9e7ba03f
import
pytest
import
path_setting
from
ids_list
import
get_ids
from
in_common.base_request
import
BaseRequest
from
all_backend_api.conversation_request
import
conversation_request
class
TestDetailLive
:
data
=
BaseRequest
()
.
api_load
(
path_setting
.
DETAIL_LIVE
)
detail_live_case
,
detail_live_data
=
get_ids
(
data
,
"detail_live"
)
@pytest.mark.parametrize
(
"param"
,
detail_live_data
,
ids
=
detail_live_case
)
def
test_detail_live
(
self
,
param
):
r
=
conversation_request
()
.
detail_live
(
param
[
"referrer_id"
])
if
r
[
"error"
]
==
0
:
assert
r
[
"error"
]
==
param
[
"assert"
]
\ No newline at end of file
test_backend_data/conversation_data/detail_live.yaml
0 → 100644
View file @
9e7ba03f
detail_live
:
-
case
:
"
直播私信主播"
referrer_id
:
737
assert
:
0
\ 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