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
304c836d
Commit
304c836d
authored
May 27, 2021
by
张淑琴
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/zsq_dev' into common_dev
parents
10a69248
a65b5aed
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
114 additions
and
14 deletions
+114
-14
im_request.py
all_backend_api/im_request.py
+1
-1
private_conversation_request.py
all_backend_api/private_conversation_request.py
+24
-0
private_conversation_request.yaml
all_backend_api/private_conversation_request.yaml
+17
-0
path_setting.py
path_setting.py
+18
-13
__init__.py
test_backend_case/private_conversation/__init__.py
+0
-0
test_private_conversation.py
...nd_case/private_conversation/test_private_conversation.py
+25
-0
__init__.py
test_backend_data/private_conversation_data/__init__.py
+0
-0
private_conversation.yaml
..._data/private_conversation_data/private_conversation.yaml
+29
-0
No files found.
all_backend_api/im_request.py
View file @
304c836d
...
...
@@ -6,7 +6,7 @@ class im_request(BaseRequest):
def
__init__
(
self
):
self
.
data
=
self
.
api_load
(
path_setting
.
CONVERSATION_DETAIL_CONFIG
)
def
conversation_detail
(
self
,
current_city_id
,
begin_msg_id
,
conversation_type
,
end_msg_id
,
referrer
):
def
conversation_detail
(
self
,
current_city_id
,
begin_msg_id
,
conversation_type
,
end_msg_id
,
referrer
):
self
.
params
[
"current_city_id"
]
=
current_city_id
self
.
params
[
"begin_msg_id"
]
=
begin_msg_id
self
.
params
[
"conversation_type"
]
=
conversation_type
...
...
all_backend_api/private_conversation_request.py
0 → 100644
View file @
304c836d
import
path_setting
from
in_common.base_request
import
BaseRequest
class
private_conversation_request
(
BaseRequest
):
def
__init__
(
self
):
self
.
data
=
self
.
api_load
(
path_setting
.
PRIVATE_CONVERSATION_CONFIG
)
def
private_conversation
(
self
,
content
,
target_uid
,
referrer
,
referrer_id
,
is_system
,
quick_consultation_id
,
diary_id
,
from_live
):
self
.
params
[
"content"
]
=
content
self
.
params
[
"target_uid"
]
=
target_uid
self
.
params
[
"referrer"
]
=
referrer
self
.
params
[
"referrer_id"
]
=
referrer_id
self
.
params
[
"is_system"
]
=
is_system
self
.
params
[
"quick_consultation_id"
]
=
quick_consultation_id
self
.
params
[
"diary_id"
]
=
diary_id
self
.
params
[
"from_live"
]
=
from_live
return
self
.
api_send
(
self
.
data
[
"private_conversation"
])
if
__name__
==
'__main__'
:
print
(
private_conversation_request
()
.
private_conversation
(
"你好"
,
"35874935"
,
"message_home"
,
""
,
0
,
""
,
""
,
""
))
\ No newline at end of file
all_backend_api/private_conversation_request.yaml
0 → 100644
View file @
304c836d
private_conversation
:
method
:
post
url
:
/api/private_conversation/
params
:
{}
data
:
content
:
${content}
target_uid
:
${target_uid}
referrer
:
${referrer}
referrer_id
:
${referrer_id}
is_system
:
${is_system}
quick_consultation_id
:
${quick_consultation_id}
diary_id
:
${diary_id}
from_live
:
${from_live}
json
:
{}
isLogin
:
1
#需要登录的接口
\ No newline at end of file
path_setting.py
View file @
304c836d
...
...
@@ -98,6 +98,23 @@ JANUS_MINE_GUESS_YOU_LIKE = os.path.join(BASE_DIR, "backend_auto/test_backend_da
#消息列表
MY_CONVERSATION_CONFIG
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/all_backend_api"
,
"my_conversation_request.yaml"
)
MY_CONVERSATION
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_backend_data/my_conversation_data"
,
"my_conversation.yaml"
)
#消息
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"
)
#消息页未读数
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"
)
#标记为已读
READALL
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_backend_data/notification_data"
,
"readall.yaml"
)
#咨询顾问相关
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"
)
SEND_MSG
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_backend_data/im_data"
,
"send_msg.yaml"
)
#发送消息
PRIVATE_CONVERSATION_CONFIG
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/all_backend_api"
,
"private_conversation_request.yaml"
)
PRIVATE_CONVERSATION
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_backend_data/private_conversation_data"
,
"private_conversation.yaml"
)
HOME_V5_CONFIG
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/all_backend_api"
,
"service_request.yaml"
)
HOME_V5
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_backend_data/service_data"
,
"home_v5.yaml"
)
...
...
@@ -121,20 +138,8 @@ DANMU_V2 = os.path.join(BASE_DIR, "backend_auto/test_backend_data/live_data", "d
#直播-主播开播
PUSH_LIVE_INFO
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_backend_data/live_data"
,
"pushlive_info.yaml"
)
#消息
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"
)
#咨询顾问
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"
)
SEND_MSG
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_backend_data/im_data"
,
"send_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"
)
#标记为已读
READALL
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_backend_data/notification_data"
,
"readall.yaml"
)
#商祥页-详情
JANUS_PRODUCT_DETAIL
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_backend_data/janus_data"
,
"product_detail.yaml"
)
...
...
test_backend_case/private_conversation/__init__.py
0 → 100644
View file @
304c836d
test_backend_case/private_conversation/test_private_conversation.py
0 → 100644
View file @
304c836d
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/__init__.py
0 → 100644
View file @
304c836d
test_backend_data/private_conversation_data/private_conversation.yaml
0 → 100644
View file @
304c836d
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