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
b45ddeab
Commit
b45ddeab
authored
Aug 20, 2021
by
张淑琴
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
清空配置
parent
3c468449
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
89 additions
and
0 deletions
+89
-0
web3_request.py
all_doctor_api/web3_request.py
+6
-0
web3_request.yaml
all_doctor_api/web3_request.yaml
+14
-0
path_setting.py
path_setting.py
+5
-0
test_conversation_robot_clean_message.py
...r_case/web3_case/test_conversation_robot_clean_message.py
+19
-0
conversation_robot_add_message.yaml
...doctor_data/web3_data/conversation_robot_add_message.yaml
+37
-0
conversation_robot_clean_message.yaml
...ctor_data/web3_data/conversation_robot_clean_message.yaml
+8
-0
No files found.
all_doctor_api/web3_request.py
View file @
b45ddeab
...
@@ -15,8 +15,14 @@ class web3_request(BaseRequest):
...
@@ -15,8 +15,14 @@ class web3_request(BaseRequest):
self
.
params
[
"message"
]
=
message
self
.
params
[
"message"
]
=
message
self
.
params
[
"csrfmiddlewaretoken"
]
=
csrfmiddlewaretoken
self
.
params
[
"csrfmiddlewaretoken"
]
=
csrfmiddlewaretoken
return
self
.
api_send
(
self
.
CONVERSATION_ROBOT
[
"conversation_robot_add_message"
])
return
self
.
api_send
(
self
.
CONVERSATION_ROBOT
[
"conversation_robot_add_message"
])
def
conversation_robot_clean_message
(
self
,
doctor_user_id
,
csrfmiddlewaretoken
):
#清空私信机器人配置
self
.
params
[
"doctor_user_id"
]
=
doctor_user_id
self
.
params
[
"csrfmiddlewaretoken"
]
=
csrfmiddlewaretoken
return
self
.
api_send
(
self
.
CONVERSATION_ROBOT
[
"conversation_robot_clean_message"
])
if
__name__
==
'__main__'
:
if
__name__
==
'__main__'
:
print
(
web3_request
()
.
conversation_robot_get_page
())
print
(
web3_request
()
.
conversation_robot_get_page
())
print
(
web3_request
()
.
conversation_robot_add_message
(
'{"default":[{"name":"","page_type":"0","tag_id":"","tag_name":"","doctor_user_id":602329,"msg_list":[{"id":168,"type":"0","content":"测试"}]}],"personality":[]}'
,
"qzDd1CYV1LngDvQaGjgq4gKoHOPyieHk"
))
print
(
web3_request
()
.
conversation_robot_add_message
(
'{"default":[{"name":"","page_type":"0","tag_id":"","tag_name":"","doctor_user_id":602329,"msg_list":[{"id":168,"type":"0","content":"测试"}]}],"personality":[]}'
,
"qzDd1CYV1LngDvQaGjgq4gKoHOPyieHk"
))
print
(
web3_request
()
.
conversation_robot_clean_message
(
"602329"
,
"qzDd1CYV1LngDvQaGjgq4gKoHOPyieHk"
))
all_doctor_api/web3_request.yaml
View file @
b45ddeab
conversation_robot_get_page
:
conversation_robot_get_page
:
#获取页面类型
method
:
get
method
:
get
url
:
/api/web3/conversation/robot/get_page
url
:
/api/web3/conversation/robot/get_page
params
:
{}
params
:
{}
...
@@ -8,6 +9,7 @@ conversation_robot_get_page:
...
@@ -8,6 +9,7 @@ conversation_robot_get_page:
isLogin
:
1
#需要登录
isLogin
:
1
#需要登录
conversation_robot_add_message
:
conversation_robot_add_message
:
#添加私信机器人配置
method
:
post
method
:
post
url
:
/api/web3/conversation/robot/add_message
url
:
/api/web3/conversation/robot/add_message
params
:
{}
params
:
{}
...
@@ -15,4 +17,15 @@ conversation_robot_add_message:
...
@@ -15,4 +17,15 @@ conversation_robot_add_message:
message
:
${message}
message
:
${message}
csrfmiddlewaretoken
:
${csrfmiddlewaretoken}
csrfmiddlewaretoken
:
${csrfmiddlewaretoken}
json
:
{}
json
:
{}
isLogin
:
1
#需要登录
conversation_robot_clean_message
:
#清空私信配置
method
:
post
url
:
/api/web3/conversation/robot/clean_message
params
:
{}
data
:
doctor_user_id
:
${doctor_user_id}
csrfmiddlewaretoken
:
${csrfmiddlewaretoken}
json
:
{}
isLogin
:
1
#需要登录
isLogin
:
1
#需要登录
\ No newline at end of file
path_setting.py
View file @
b45ddeab
...
@@ -503,8 +503,13 @@ CONVERSATIONUSERID=os.path.join(BASE_DIR, "backend_auto/test_doctor_data/web_dat
...
@@ -503,8 +503,13 @@ CONVERSATIONUSERID=os.path.join(BASE_DIR, "backend_auto/test_doctor_data/web_dat
#医生后台-私信机器人
#医生后台-私信机器人
CONVERSATION_ROBOT
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/all_doctor_api"
,
"web3_request.yaml"
)
CONVERSATION_ROBOT
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/all_doctor_api"
,
"web3_request.yaml"
)
#医生后台-获取页面类型
ROBOTGETPAGE
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_doctor_data/web3_data"
,
"conversation_robot_get_page.yaml"
)
ROBOTGETPAGE
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_doctor_data/web3_data"
,
"conversation_robot_get_page.yaml"
)
#医生后台-添加私信配置
ROBOTADDMESSAGE
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_doctor_data/web3_data"
,
"conversation_robot_add_message.yaml"
)
ROBOTADDMESSAGE
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_doctor_data/web3_data"
,
"conversation_robot_add_message.yaml"
)
#医生后台-清空私信配置
ROBOTCLEANMESSAGE
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_doctor_data/web3_data"
,
"conversation_robot_clean_message.yaml"
)
#医生后台-服务资源
#医生后台-服务资源
...
...
test_doctor_case/web3_case/test_conversation_robot_clean_message.py
0 → 100644
View file @
b45ddeab
import
pytest
from
ids_list
import
get_ids
import
path_setting
from
in_common.base_request
import
BaseRequest
from
all_doctor_api.web3_request
import
web3_request
class
TestConversationRobotCleanMessage
:
data
=
BaseRequest
()
.
api_load
(
path_setting
.
ROBOTCLEANMESSAGE
)
robot_clean_message_case
,
robot_clean_message_data
=
get_ids
(
data
,
"conversation_robot_clean_message"
)
@pytest.mark.parametrize
(
"param"
,
robot_clean_message_data
,
ids
=
robot_clean_message_case
)
def
test_conversation_robot_clean_message
(
self
,
param
):
'''私信机器人-添加私信配置'''
r
=
web3_request
()
.
conversation_robot_clean_message
(
param
[
"doctor_user_id"
],
param
[
"csrfmiddlewaretoken"
])
if
r
[
"error"
]
==
0
:
assert
r
[
"message"
]
==
param
[
"assert"
]
test_doctor_data/web3_data/conversation_robot_add_message.yaml
View file @
b45ddeab
...
@@ -73,3 +73,40 @@ conversation_robot_add_message:
...
@@ -73,3 +73,40 @@ conversation_robot_add_message:
csrfmiddlewaretoken
:
"
qzDd1CYV1LngDvQaGjgq4gKoHOPyieHk"
csrfmiddlewaretoken
:
"
qzDd1CYV1LngDvQaGjgq4gKoHOPyieHk"
assert
:
"
配置成功"
assert
:
"
配置成功"
-
case
:
"
私信机器人-默认配置文本+个性配置商详页眼科-文本+图片"
message
:
'
{"default":[{"name":"","page_type":"0","tag_id":"","tag_name":"","doctor_user_id":602329,"msg_list":[{"id":168,"type":"0","content":"这是默认配置"}]}],"personality":[{"name":"商详页","page_type":"1","tag_id":12711,"doctor_user_id":602329,"msg_list":[{"id":"","type":"0","content":"商详页文案"},{"id":"","type":"2","content":"https://heras.igengmei.com/service/2021/08/20/a008207781"}]}]}'
csrfmiddlewaretoken
:
"
qzDd1CYV1LngDvQaGjgq4gKoHOPyieHk"
assert
:
"
配置成功"
-
case
:
"
私信机器人-默认配置文本+个性配置商详页眼科-文本+图片+优惠券"
message
:
'
{"default":[{"name":"","page_type":"0","tag_id":"","tag_name":"","doctor_user_id":602329,"msg_list":[{"id":168,"type":"0","content":"这是默认配置"}]}],"personality":[{"name":"商详页","page_type":"1","tag_id":12711,"doctor_user_id":602329,"msg_list":[{"id":"","type":"0","content":"商详页文案"},{"id":"","type":"2","content":"https://heras.igengmei.com/service/2021/08/20/a008207781"},{"id":"","type":"9","content":"59055,51"}]}]}'
csrfmiddlewaretoken
:
"
qzDd1CYV1LngDvQaGjgq4gKoHOPyieHk"
assert
:
"
配置成功"
-
case
:
"
私信机器人-默认配置文本+个性配置商详页眼科-文本+图片+优惠券+敏感词"
message
:
'
{"default":[{"name":"","page_type":"0","tag_id":"","tag_name":"","doctor_user_id":602329,"msg_list":[{"id":168,"type":"0","content":"这是默认配置"}]}],"personality":[{"name":"商详页","page_type":"1","tag_id":12711,"doctor_user_id":602329,"msg_list":[{"id":"","type":"0","content":"商详页文案"},{"id":"","type":"2","content":"https://heras.igengmei.com/service/2021/08/20/a008207781"},{"id":"","type":"9","content":"59055,51"},{"id":"","type":"0","content":"敏感词微信"}]}]}'
csrfmiddlewaretoken
:
"
qzDd1CYV1LngDvQaGjgq4gKoHOPyieHk"
assert
:
"
配置成功"
-
case
:
"
私信机器人-默认配置文本+个性配置商详页眼科-文本+医生主页文本"
message
:
'
{"default":[{"name":"","page_type":"0","tag_id":"","tag_name":"","doctor_user_id":602329,"msg_list":[{"id":168,"type":"0","content":"这是默认配置"}]}],"personality":[{"name":"商详页","page_type":"1","tag_id":12711,"doctor_user_id":602329,"msg_list":[{"id":"","type":"0","content":"商详页文案"},{"id":"","type":"2","content":"https://heras.igengmei.com/service/2021/08/20/a008207781"},{"id":"","type":"9","content":"59055,51"}]},{"name":"医生主页","page_type":"3","tag_id":"","doctor_user_id":602329,"msg_list":[{"id":"","type":"0","content":"医生主页文案"}]}]}'
csrfmiddlewaretoken
:
"
qzDd1CYV1LngDvQaGjgq4gKoHOPyieHk"
assert
:
"
配置成功"
-
case
:
"
私信机器人-默认配置文本+个性配置商详页眼科-文本+医生主页文本+机构主页文本"
message
:
'
{"default":[{"name":"","page_type":"0","tag_id":"","tag_name":"","doctor_user_id":602329,"msg_list":[{"id":168,"type":"0","content":"这是默认配置"}]}],"personality":[{"name":"商详页","page_type":"1","tag_id":12711,"doctor_user_id":602329,"msg_list":[{"id":"","type":"0","content":"商详页文案"},{"id":"","type":"2","content":"https://heras.igengmei.com/service/2021/08/20/a008207781"},{"id":"","type":"9","content":"59055,51"}]},{"name":"医生主页","page_type":"3","tag_id":"","doctor_user_id":602329,"msg_list":[{"id":"","type":"0","content":"医生主页文案"}]},{"name":"机构主页","page_type":"2","tag_id":"","doctor_user_id":602329,"msg_list":[{"id":"","type":"0","content":"机构主页文案"}]}]}'
csrfmiddlewaretoken
:
"
qzDd1CYV1LngDvQaGjgq4gKoHOPyieHk"
assert
:
"
配置成功"
-
case
:
"
私信机器人-默认配置文本+个性配置商详页三个类目-文本+医生机构主页配置"
message
:
'
{"default":[{"name":"","page_type":"0","tag_id":"","tag_name":"","doctor_user_id":602329,"msg_list":[{"id":168,"type":"0","content":"这是默认配置"}]}],"personality":[{"name":"商详页","page_type":"1","tag_id":12711,"doctor_user_id":602329,"msg_list":[{"id":"","type":"0","content":"商详页文案"},{"id":"","type":"2","content":"https://heras.igengmei.com/service/2021/08/20/a008207781"},{"id":"","type":"9","content":"59055,51"}]},{"name":"医生主页","page_type":"3","tag_id":"","doctor_user_id":602329,"msg_list":[{"id":"","type":"0","content":"医生主页文案"}]},{"name":"机构主页","page_type":"2","tag_id":"","doctor_user_id":602329,"msg_list":[{"id":"","type":"0","content":"机构主页文案"}]},{"name":"商详页","page_type":"1","tag_id":2,"doctor_user_id":602329,"msg_list":[{"id":"","type":"0","content":"商详页-鼻部整形"}]},{"name":"商详页","page_type":"1","tag_id":1,"doctor_user_id":602329,"msg_list":[{"id":"","type":"0","content":"商详页-眼部整形"}]}]}'
csrfmiddlewaretoken
:
"
qzDd1CYV1LngDvQaGjgq4gKoHOPyieHk"
assert
:
"
配置成功"
test_doctor_data/web3_data/conversation_robot_clean_message.yaml
0 → 100644
View file @
b45ddeab
conversation_robot_clean_message
:
#私信机器人-清空私信配置
-
case
:
"
私信机器人-清空私信配置"
doctor_user_id
:
"
602329"
csrfmiddlewaretoken
:
"
qzDd1CYV1LngDvQaGjgq4gKoHOPyieHk"
assert
:
"
清空成功"
\ 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