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
ccedf9de
You need to sign in or sign up before continuing.
Commit
ccedf9de
authored
Aug 25, 2021
by
张淑琴
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
获取一级类目
parent
d0aefb36
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
46 additions
and
0 deletions
+46
-0
web3_request.py
all_doctor_api/web3_request.py
+5
-0
web3_request.yaml
all_doctor_api/web3_request.yaml
+11
-0
path_setting.py
path_setting.py
+2
-0
test_tag_first_list.py
test_doctor_case/web3_case/test_tag_first_list.py
+21
-0
tag_first_list.yaml
test_doctor_data/web3_data/tag_first_list.yaml
+7
-0
No files found.
all_doctor_api/web3_request.py
View file @
ccedf9de
...
...
@@ -10,6 +10,10 @@ class web3_request(BaseRequest):
#获取页面类型
return
self
.
api_send
(
self
.
CONVERSATION_ROBOT
[
"conversation_robot_get_page"
])
def
tag_first_list
(
self
):
#获取一级类目
return
self
.
api_send
(
self
.
CONVERSATION_ROBOT
[
"tag_first_list"
])
def
conversation_robot_add_message
(
self
,
message
,
csrfmiddlewaretoken
):
#添加私信机器人配置
self
.
params
[
"message"
]
=
message
...
...
@@ -33,3 +37,4 @@ if __name__ == '__main__':
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_get_message
(
"602329"
))
print
(
web3_request
()
.
conversation_robot_clean_message
(
"602329"
,
"qzDd1CYV1LngDvQaGjgq4gKoHOPyieHk"
))
print
(
web3_request
()
.
tag_first_list
())
all_doctor_api/web3_request.yaml
View file @
ccedf9de
...
...
@@ -39,3 +39,13 @@ conversation_robot_clean_message:
csrfmiddlewaretoken
:
${csrfmiddlewaretoken}
json
:
{}
isLogin
:
1
#需要登录
tag_first_list
:
#获取一级类目
method
:
get
url
:
/api/web3/tag/first_list
params
:
{}
data
:
{}
json
:
{}
isLogin
:
1
#需要登录
\ No newline at end of file
path_setting.py
View file @
ccedf9de
...
...
@@ -511,6 +511,8 @@ ROBOTADDMESSAGE= os.path.join(BASE_DIR, "backend_auto/test_doctor_data/web3_data
ROBOTGETMESSAGE
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_doctor_data/web3_data"
,
"conversation_robot_get_message.yaml"
)
#医生后台-清空私信配置
ROBOTCLEANMESSAGE
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_doctor_data/web3_data"
,
"conversation_robot_clean_message.yaml"
)
#医生后台-获取一级类目
TAGFIRSTLIST
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_doctor_data/web3_data"
,
"tag_first_list.yaml"
)
...
...
test_doctor_case/web3_case/test_tag_first_list.py
0 → 100644
View file @
ccedf9de
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
TestTagFirstList
:
data
=
BaseRequest
()
.
api_load
(
path_setting
.
TAGFIRSTLIST
)
tag_first_list_case
,
tag_first_list_data
=
get_ids
(
data
,
"tag_first_list"
)
@pytest.mark.parametrize
(
"param"
,
tag_first_list_data
,
ids
=
tag_first_list_case
)
def
test_tag_first_list
(
self
,
param
):
'''私信机器人-获取一级类目'''
r
=
web3_request
()
.
tag_first_list
()
if
r
[
"error"
]
==
0
:
#data = r.get("data").get("data", [])
#assert len["data"] >= param["assert"]
assert
r
[
"data"
][
"total"
]
>=
param
[
"assert"
]
test_doctor_data/web3_data/tag_first_list.yaml
0 → 100644
View file @
ccedf9de
tag_first_list
:
#私信机器人-获取一级类目
-
case
:
"
私信机器人-获取一级类目"
#doctor_user_id: "602329"
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