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
233a7b7b
Commit
233a7b7b
authored
Jun 04, 2021
by
aha
Browse files
Options
Browse Files
Download
Plain Diff
更美热门榜/医生医院sug列表
parents
11c8a2fc
888722a0
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
63 changed files
with
938 additions
and
51 deletions
+938
-51
.gitignore
.gitignore
+0
-4
accounts_request.yaml
all_backend_api/accounts_request.yaml
+1
-1
answer_request.py
all_backend_api/answer_request.py
+24
-0
answer_request.yaml
all_backend_api/answer_request.yaml
+33
-0
eyelids_request.py
all_backend_api/eyelids_request.py
+25
-0
eyelids_request.yaml
all_backend_api/eyelids_request.yaml
+8
-0
gmai_request.py
all_backend_api/gmai_request.py
+0
-0
im_request.py
all_backend_api/im_request.py
+15
-5
im_request.yaml
all_backend_api/im_request.yaml
+18
-2
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
question_request.py
all_backend_api/question_request.py
+17
-0
question_request.yaml
all_backend_api/question_request.yaml
+13
-0
web2_request.py
all_doctor_api/web2_request.py
+27
-5
web2_request.yaml
all_doctor_api/web2_request.yaml
+44
-0
web_request.py
all_doctor_api/web_request.py
+24
-0
web_request.yaml
all_doctor_api/web_request.yaml
+27
-0
host.yaml
host.yaml
+0
-1
ids_list.py
ids_list.py
+5
-1
base_request.py
in_common/base_request.py
+2
-2
path_setting.py
path_setting.py
+61
-13
__init__.py
test_backend_case/answer_case/__init__.py
+0
-0
test_cancel_vote.py
test_backend_case/answer_case/test_cancel_vote.py
+16
-0
test_detail.py
test_backend_case/answer_case/test_detail.py
+22
-0
test_vote.py
test_backend_case/answer_case/test_vote.py
+16
-0
__init__.py
test_backend_case/eyelids_case/__init__.py
+0
-0
test_diary_cards.py
test_backend_case/eyelids_case/test_diary_cards.py
+21
-0
test_simulate_analyze.py
test_backend_case/gmai_case/test_simulate_analyze.py
+1
-1
test_auto_msg.py
test_backend_case/im_case/test_auto_msg.py
+3
-3
test_send_msg.py
test_backend_case/im_case/test_send_msg.py
+22
-0
__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_case/question_case/__init__.py
+2
-0
test_reply_answer.py
test_backend_case/question_case/test_reply_answer.py
+16
-0
__init__.py
test_backend_data/answer_data/__init__.py
+2
-0
cancel_vote.yaml
test_backend_data/answer_data/cancel_vote.yaml
+6
-0
detail.yaml
test_backend_data/answer_data/detail.yaml
+8
-0
vote.yaml
test_backend_data/answer_data/vote.yaml
+5
-0
__init__.py
test_backend_data/eyelids_data/__init__.py
+0
-0
diary_cards.yaml
test_backend_data/eyelids_data/diary_cards.yaml
+14
-0
simulate_analyze.yaml
test_backend_data/gmai_data/simulate_analyze.yaml
+32
-2
auto_msg.yaml
test_backend_data/im_data/auto_msg.yaml
+0
-3
send_msg.yaml
test_backend_data/im_data/send_msg.yaml
+29
-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
__init__.py
test_backend_data/question_data/__init__.py
+2
-0
reply_answer.yaml
test_backend_data/question_data/reply_answer.yaml
+9
-0
test_service_list.py
test_doctor_case/web2_case/test_service_list.py
+10
-6
test_service_review_list.py
test_doctor_case/web2_case/test_service_review_list.py
+24
-0
test_servicereview_option.py
test_doctor_case/web2_case/test_servicereview_option.py
+26
-0
test_tag_all.py
test_doctor_case/web2_case/test_tag_all.py
+25
-0
__init__.py
test_doctor_case/web_case/__init__.py
+0
-0
test_account_unreadbadgecount.py
test_doctor_case/web_case/test_account_unreadbadgecount.py
+23
-0
test_article_videotoken.py
test_doctor_case/web_case/test_article_videotoken.py
+23
-0
test_doctor_submechanisms.py
test_doctor_case/web_case/test_doctor_submechanisms.py
+23
-0
service_list.yaml
test_doctor_data/web2_data/service_list.yaml
+41
-2
service_review_list.yaml
test_doctor_data/web2_data/service_review_list.yaml
+26
-0
servicereview_option.yaml
test_doctor_data/web2_data/servicereview_option.yaml
+32
-0
tag_all.yaml
test_doctor_data/web2_data/tag_all.yaml
+5
-0
__init__.py
test_doctor_data/web_data/__init__.py
+0
-0
account_unreadbadgecount.yaml
test_doctor_data/web_data/account_unreadbadgecount.yaml
+5
-0
article_videotoken.yaml
test_doctor_data/web_data/article_videotoken.yaml
+5
-0
doctor_submechanisms.yaml
test_doctor_data/web_data/doctor_submechanisms.yaml
+5
-0
No files found.
.gitignore
View file @
233a7b7b
.gitignore
host.yaml
base_request.py
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
...
...
all_backend_api/accounts_request.yaml
View file @
233a7b7b
password
:
password
:
method
:
post
url
:
/api/accounts/login/password
params
:
...
...
all_backend_api/answer_request.py
0 → 100644
View file @
233a7b7b
import
path_setting
from
in_common.base_request
import
BaseRequest
class
answer_request
(
BaseRequest
):
def
__init__
(
self
):
self
.
abc
=
self
.
api_load
(
path_setting
.
DETAIL_CONFIG
)
# print(self.abc)
# 回答详情页
def
detail
(
self
,
current_city_id
,
answer_id
=
""
):
self
.
params
[
"current_city_id"
]
=
current_city_id
self
.
params
[
"answer_id"
]
=
answer_id
return
self
.
api_send
(
self
.
abc
[
"detail"
])
# 回答详情页点赞
def
vote
(
self
,
answer_id
=
""
):
self
.
params
[
"answer_id"
]
=
answer_id
return
self
.
api_send
(
self
.
abc
[
"vote"
])
# 回答详情页取消点赞
def
cancel_vote
(
self
,
answer_id
=
""
):
self
.
params
[
"answer_id"
]
=
answer_id
return
self
.
api_send
(
self
.
abc
[
"cancel_vote"
])
all_backend_api/answer_request.yaml
0 → 100644
View file @
233a7b7b
#回答详情页
detail
:
method
:
get
url
:
/api/answer/detail
params
:
current_city_id
:
${current_city_id}
data
:
answer_id
:
${answer_id}
json
:
{}
# isLogin: 1 #需要登录添加这个字段,值为1 0是不需要登录的情况,如不需要登录,可以不添加这个字段
#回答详情页——点赞
vote
:
method
:
post
url
:
/api/answer/vote
params
:
current_city_id
:
${current_city_id}
data
:
answer_id
:
${answer_id}
json
:
{}
isLogin
:
1
#回答详情页——取消点赞
cancel_vote
:
method
:
post
url
:
/api/answer/cancel_vote
params
:
current_city_id
:
${current_city_id}
data
:
answer_id
:
${answer_id}
json
:
{}
isLogin
:
1
all_backend_api/eyelids_request.py
0 → 100644
View file @
233a7b7b
import
path_setting
from
in_common.base_request
import
BaseRequest
class
eyelids_request
(
BaseRequest
):
def
__init__
(
self
):
self
.
data
=
self
.
api_load
(
path_setting
.
EYELIDS_DIARY_CARDS_CONFIG
)
# 模拟整形,双眼皮,发型,美瞳,眉毛推荐日记
def
diary_cards
(
self
,
current_city_id
,
page
,
page_size
,
tag_names
):
self
.
params
[
"current_city_id"
]
=
current_city_id
self
.
params
[
"page"
]
=
page
self
.
params
[
"page_size"
]
=
page_size
self
.
params
[
"tag_names"
]
=
tag_names
return
self
.
api_send
(
self
.
data
[
"diary_cards"
])
if
__name__
==
'__main__'
:
tag_names
=
'["埋线双眼皮","定点双眼皮","切开双眼皮"]'
print
(
eyelids_request
()
.
diary_cards
(
"beijing"
,
"1"
,
"10"
,
tag_names
))
\ No newline at end of file
all_backend_api/eyelids_request.yaml
0 → 100644
View file @
233a7b7b
diary_cards
:
method
:
get
url
:
/api/eyelids/diary_cards
params
:
current_city_id
:
${current_city_id}
page
:
${page}
page_size
:
${page_size}
tag_names
:
${tag_names}
all_backend_api/gmai_request.py
View file @
233a7b7b
This diff is collapsed.
Click to expand it.
all_backend_api/im_request.py
View file @
233a7b7b
...
...
@@ -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
...
...
@@ -14,17 +14,27 @@ class im_request(BaseRequest):
self
.
params
[
"referrer"
]
=
referrer
return
self
.
api_send
(
self
.
data
[
"conversation_detail"
])
def
auto_msg
(
self
,
version
,
uqid
,
trace_id
,
conversation_id
):
self
.
params
[
"version"
]
=
version
self
.
params
[
"uqid"
]
=
uqid
def
auto_msg
(
self
,
trace_id
,
conversation_id
):
self
.
params
[
"trace_id"
]
=
trace_id
self
.
params
[
"conversation_id"
]
=
conversation_id
return
self
.
api_send
(
self
.
data
[
"auto_msg"
])
def
send_msg
(
self
,
conversation_id
,
is_system
,
referrer
,
referrer_id
,
msg_type
,
content
,
extra
):
self
.
params
[
"conversation_id"
]
=
conversation_id
self
.
params
[
"is_system"
]
=
is_system
self
.
params
[
"referrer"
]
=
referrer
self
.
params
[
"referrer_id"
]
=
referrer_id
self
.
params
[
"msg_type"
]
=
msg_type
self
.
params
[
"content"
]
=
content
self
.
params
[
"extra"
]
=
extra
return
self
.
api_send
(
self
.
data
[
"send_msg"
])
if
__name__
==
'__main__'
:
print
(
im_request
()
.
conversation_detail
(
"beijing"
,
0
,
4
,
0
,
"message_home"
))
print
(
"第二个接口"
)
print
(
im_request
()
.
auto_msg
(
"7.42.2"
,
"1B519701-A4F5-453E-9D99-140B5AF697A0"
,
"2021/04/22/1722/70a1791606d5"
,
368
))
print
(
im_request
()
.
auto_msg
(
"2021/04/22/1722/70a1791606d5"
,
368
))
print
(
"send_msg"
)
print
(
im_request
()
.
send_msg
(
"368"
,
0
,
"message_home"
,
""
,
0
,
"您好,我想咨询一下"
,
{}))
...
...
all_backend_api/im_request.yaml
View file @
233a7b7b
...
...
@@ -16,12 +16,27 @@ auto_msg:
method
:
post
url
:
/api/im/auto_msg
params
:
version
:
${version}
trace_id
:
${trace_id}
uqidd
:
${uqid}
data
:
conversation_id
:
${conversation_id}
json
:
{}
isLogin
:
1
#需要登录的接口
send_msg
:
method
:
post
url
:
/api/im/send_msg
params
:
{}
data
:
conversation_id
:
${conversation_id}
is_system
:
${is_system}
referrer
:
${referrer}
referrer_id
:
${referrer_id}
msg_type
:
${msg_type}
content
:
${content}
extra
:
${extra}
json
:
{}
isLogin
:
1
#需要登录的接口
\ No newline at end of file
all_backend_api/private_conversation_request.py
0 → 100644
View file @
233a7b7b
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 @
233a7b7b
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
all_backend_api/question_request.py
0 → 100644
View file @
233a7b7b
import
path_setting
from
in_common.base_request
import
BaseRequest
class
question_request
(
BaseRequest
):
def
__init__
(
self
):
self
.
replyanswer
=
self
.
api_load
(
path_setting
.
QUESTION_CONFIG
)
# print(self.replyanswer)
# 回答详情页- 一/二级评论
def
reply_answer
(
self
,
current_city_id
,
answer_id
,
content
,
user_id
=
""
):
self
.
params
[
"current_city_id"
]
=
current_city_id
self
.
params
[
"answer_id"
]
=
answer_id
self
.
params
[
"content"
]
=
content
self
.
params
[
"user_id"
]
=
user_id
return
self
.
api_send
(
self
.
replyanswer
[
"reply_answer"
])
all_backend_api/question_request.yaml
0 → 100644
View file @
233a7b7b
#回答详情页- 一/二级评论
reply_answer
:
method
:
post
url
:
/api/question/reply_answer
params
:
current_city_id
:
${current_city_id}
data
:
answer_id
:
${answer_id}
content
:
${content}
user_id
:
${user_id}
json
:
{}
isLogin
:
1
\ No newline at end of file
all_doctor_api/web2_request.py
View file @
233a7b7b
...
...
@@ -4,14 +4,36 @@ from in_common.base_request import BaseRequest
class
web2_request
(
BaseRequest
):
def
__init__
(
self
):
self
.
data
=
self
.
api_load
(
path_setting
.
SERVICE_URL
)
self
.
SERVICE_URL
=
self
.
api_load
(
path_setting
.
SERVICE_URL
)
# self.SERVICE_REVIEW_URL = self.api_load(path_setting.SERVICE_REVIEW_URL)
def
service_list
(
self
,
page
,
pagesize
,
is_online
):
def
service_list
(
self
,
page
,
pagesize
,
is_online
,
extra_filter_choice
):
self
.
params
[
"page"
]
=
page
self
.
params
[
"pagesize"
]
=
pagesize
self
.
params
[
"is_online"
]
=
is_online
self
.
params
[
"extra_filter_choice"
]
=
extra_filter_choice
return
self
.
api_send
(
self
.
SERVICE_URL
[
"service_list"
])
def
service_review_list
(
self
,
page
,
pagesize
,
type
):
self
.
params
[
"page"
]
=
page
self
.
params
[
"pagesize"
]
=
pagesize
self
.
params
[
"type"
]
=
type
return
self
.
api_send
(
self
.
SERVICE_URL
[
"service_review_list"
])
def
servicereview_option
(
self
,
id
,
type
,
csrfmiddlewaretoken
):
self
.
params
[
"id"
]
=
id
self
.
params
[
"type"
]
=
type
self
.
params
[
"csrfmiddlewaretoken"
]
=
csrfmiddlewaretoken
return
self
.
api_send
(
self
.
SERVICE_URL
[
"servicereview_option"
])
def
tag_all
(
self
)
:
return
self
.
api_send
(
self
.
SERVICE_URL
[
"tag_all"
])
return
self
.
api_send
(
self
.
data
[
"service_list"
])
if
__name__
==
'__main__'
:
print
(
web2_request
()
.
service_list
(
"1"
,
"10"
,
"-1"
))
\ No newline at end of file
print
(
web2_request
()
.
service_list
(
"1"
,
"10"
,
"-1"
,
"-1"
))
print
(
web2_request
()
.
service_review_list
(
"1"
,
"10"
,
"0"
))
print
(
web2_request
()
.
servicereview_option
(
"209989"
,
"1"
,
"PC8uTySuxipukIMuqNV1OPB376C2ZZ3g"
))
print
(
web2_request
()
.
tag_all
())
\ No newline at end of file
all_doctor_api/web2_request.yaml
View file @
233a7b7b
...
...
@@ -5,6 +5,49 @@ service_list:
page
:
${page}
pagesize
:
${pagesize}
is_online
:
${is_online}
extra_filter_choice
:
${extra_filter_choice}
data
:
phone_num
:
${phone_num}
vfc_code
:
${vfc_code}
face_token
:
${face_token}
json
:
{}
isLogin
:
1
service_review_list
:
method
:
get
url
:
/api/web2/service/review/list
params
:
page
:
${page}
pagesize
:
${pagesize}
type
:
${type}
data
:
phone_num
:
${phone_num}
vfc_code
:
${vfc_code}
face_token
:
${face_token}
json
:
{}
isLogin
:
1
servicereview_option
:
method
:
POST
url
:
/api/web2/servicereview/option
params
:
{}
data
:
id
:
${id}
type
:
${type}
csrfmiddlewaretoken
:
${csrfmiddlewaretoken}
phone_num
:
${phone_num}
vfc_code
:
${vfc_code}
face_token
:
${face_token}
json
:
{}
isLogin
:
1
tag_all
:
method
:
get
url
:
/api/web2/tag/all
param
:
{}
data
:
{}
json
:
{}
isLogin
:
1
\ No newline at end of file
all_doctor_api/web_request.py
0 → 100644
View file @
233a7b7b
import
path_setting
from
in_common.base_request
import
BaseRequest
class
web_request
(
BaseRequest
):
def
__init__
(
self
):
self
.
data
=
self
.
api_load
(
path_setting
.
ACCOUNT_URL
)
def
account_unreadbadgecount
(
self
)
:
return
self
.
api_send
(
self
.
data
[
"account_unreadbadgecount"
])
def
article_videotoken
(
self
)
:
return
self
.
api_send
(
self
.
data
[
"article_videotoken"
])
def
doctor_submechanisms
(
self
)
:
return
self
.
api_send
(
self
.
data
[
"doctor_submechanisms"
])
if
__name__
==
'__main__'
:
print
(
web_request
()
.
account_unreadbadgecount
())
print
(
web_request
()
.
article_videotoken
())
print
(
web_request
()
.
doctor_submechanisms
())
all_doctor_api/web_request.yaml
0 → 100644
View file @
233a7b7b
account_unreadbadgecount
:
method
:
get
url
:
/api/web/account/unread_badge_count
param
:
{}
data
:
{}
json
:
{}
isLogin
:
1
article_videotoken
:
method
:
get
url
:
/api/web/article/video_token
param
:
{}
data
:
{}
json
:
{}
isLogin
:
1
doctor_submechanisms
:
method
:
get
url
:
/api/web/doctor/submechanisms
param
:
{}
data
:
{}
json
:
{}
isLogin
:
1
host.yaml
View file @
233a7b7b
...
...
@@ -2,4 +2,3 @@ develop_host:
backend
:
http://backend.paas-develop.env
# doctor: http://doctor.paas-develop.env
# backend: https://backend.igengmei.com
ids_list.py
View file @
233a7b7b
...
...
@@ -2,7 +2,11 @@
此文件是用来将case转换成list
'''
def
get_ids
(
data
,
path
):
def
get_ids
(
data
:
object
,
path
:
object
)
->
object
:
"""
@rtype:
"""
params
=
data
[
path
]
case
=
[]
for
ids
in
params
:
...
...
in_common/base_request.py
View file @
233a7b7b
...
...
@@ -25,7 +25,7 @@ class BaseRequest:
return
yaml
.
safe_load
(
f
)
# 调用yaml加载文件API加载
def
api_load
(
self
,
path
)
:
def
api_load
(
self
,
path
:
object
)
->
object
:
return
self
.
yaml_load
(
path
)
def
jsonpath
(
self
,
path
,
r
=
None
,
**
kwargs
):
...
...
@@ -33,7 +33,7 @@ class BaseRequest:
r
=
self
.
r
.
json
()
return
jsonpath
(
r
,
path
)
def
api_send
(
self
,
req
:
dict
)
:
def
api_send
(
self
,
req
:
object
)
->
object
:
host
=
self
.
api_load
(
path_setting
.
HOSTYAML_CONFIG
)
# 获取调用该方法的路径
...
...
path_setting.py
View file @
233a7b7b
...
...
@@ -18,9 +18,35 @@ DIARY_DATA = os.path.join(BASE_DIR, "backend_auto/test_backend_data/account_data
KEYWORDS_CONFIG
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/all_backend_api"
,
"search_request.yaml"
)
KEYWORDS
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_backend_data/search_data"
,
"keywords.yaml"
)
#医生后台-我的商品
SERVICE_DATA
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_doctor_data/web2_data"
,
"service_list.yaml"
)
SERVICE_URL
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/all_doctor_api"
,
"web2_request.yaml"
)
#医生后台-商品审核流程
SERVICE_REVIEW_DATA
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_doctor_data/web2_data"
,
"service_review_list.yaml"
)
#医生后台-新商品审核-撤回审核流程
SERVICEREVIEW_OPTION_DATA
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_doctor_data/web2_data"
,
"servicereview_option.yaml"
)
#医生后台-发布商品选择类目ACCOUNT
ACCOUNT_URL
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/all_doctor_api"
,
"web_request.yaml"
)
ACCOUNT_DATA
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_doctor_data/web_data"
,
"account_unreadbadgecount.yaml"
)
# 医生后台-发布商品选择类目article
ARTICLE_DATA
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_doctor_data/web_data"
,
"article_videotoken.yaml"
)
#医生后台 - 发布商品选择类目tag
TAG_DATA
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_doctor_data/web2_data"
,
"tag_all.yaml"
)
#医生后台 - 发布商品选择类目doctor
DOCTOR_DATA
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_doctor_data/web_data"
,
"doctor_submechanisms.yaml"
)
#搜索首页-热门搜索
KEYWORDS_CONFIG
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/all_backend_api"
,
"search_request.yaml"
)
KEYWORDS
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_backend_data/search_data"
,
"keywords.yaml"
)
# 首页灰度v9,精选tab
FEED_INDEXV9_CONFIG
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/all_backend_api"
,
"feed_request.yaml"
)
...
...
@@ -44,7 +70,9 @@ GMAI_EYELIDS_PLASTIC_DATA = os.path.join(BASE_DIR, "backend_auto/test_backend_da
GMAI_SIMULATE_ANALYZE_DATA
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_backend_data/gmai_data"
,
"simulate_analyze.yaml"
)
# 获取模拟整形相关配置文件
GMAI_SIMULATE_CONF_DATA
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_backend_data/gmai_data"
,
"simulate_conf.yaml"
)
# 模拟双眼皮,发型,美瞳,眉毛下日记推荐(根据标签)
EYELIDS_DIARY_CARDS_CONFIG
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/all_backend_api"
,
"eyelids_request.yaml"
)
EYELIDS_DIARY_CARDS_DATA
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_backend_data/eyelids_data"
,
"diary_cards.yaml"
)
# AI变脸结果
GMAI_PLASTIC_ANALYSIS_V3_DATA
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_backend_data/gmai_data"
,
"plastic_analysis_v3.yaml"
)
...
...
@@ -89,6 +117,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"
)
...
...
@@ -112,19 +157,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"
)
#消息页未读数
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"
)
...
...
@@ -166,6 +200,7 @@ THIRD_PHONE_LOGIN_CONFIG = os.path.join(BASE_DIR,"backend_auto/all_backend_api",
THIRD_PHONE_LOGIN
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_backend_data/account_data"
,
"login_thirdphone"
)
#医生医院sug列表
KEYWORDTIP_CONFIG
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/all_backend_api"
,
"janus_request.yaml"
)
KEYWORDTIP
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_backend_data/janus_data"
,
"keyword_tip.yaml"
)
...
...
@@ -174,5 +209,18 @@ KEYWORDTIP = os.path.join(BASE_DIR, "backend_auto/test_backend_data/janus_data",
HOT_CONFIG
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/all_backend_api"
,
"search_request.yaml"
)
HOT
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_backend_data/search_data"
,
"hot.yaml"
)
#回答详情页点赞
VOTE
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_backend_data/answer_data"
,
"vote.yaml"
)
#回答详情页取消点赞
CANCEL_VOTE
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_backend_data/answer_data"
,
"cancel_vote.yaml"
)
#回答详情页- 一/二级评论
QUESTION_CONFIG
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/all_backend_api"
,
"question_request.yaml"
)
REPLY_ANSWER
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_backend_data/question_data"
,
"reply_answer.yaml"
)
#回答详情页
DETAIL_CONFIG
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/all_backend_api"
,
"answer_request.yaml"
)
DETAIL
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_backend_data/answer_data"
,
"detail.yaml"
)
if
__name__
==
'__main__'
:
print
(
"=========="
,
LIVEYAML_CONFIG
)
test_backend_case/answer_case/__init__.py
0 → 100644
View file @
233a7b7b
test_backend_case/answer_case/test_cancel_vote.py
0 → 100644
View file @
233a7b7b
import
pytest
from
ids_list
import
get_ids
import
path_setting
from
in_common.base_request
import
BaseRequest
from
all_backend_api.answer_request
import
answer_request
class
TestCancelVote
:
data
=
BaseRequest
()
.
api_load
(
path_setting
.
CANCEL_VOTE
)
cancelvote_case
,
cancelvote_data
=
get_ids
(
data
,
"cancel_vote"
)
@pytest.mark.parametrize
(
"param"
,
cancelvote_data
,
ids
=
cancelvote_case
)
def
test_cancel_vote
(
self
,
param
):
r
=
answer_request
()
.
cancel_vote
(
param
[
"answer_id"
])
if
r
[
"error"
]
==
1
:
assert
r
[
"message"
]
==
param
[
"assert"
]
test_backend_case/answer_case/test_detail.py
0 → 100644
View file @
233a7b7b
import
pytest
from
ids_list
import
get_ids
import
path_setting
from
in_common.base_request
import
BaseRequest
from
all_backend_api.account_request
import
account_request
class
TestLoginVfc
:
data
=
BaseRequest
()
.
api_load
(
path_setting
.
LOGIN_VFC
)
loginvfc_case
,
loginvfc_data
=
get_ids
(
data
,
"login_vfc"
)
@pytest.mark.parametrize
(
"param"
,
loginvfc_data
,
ids
=
loginvfc_case
)
def
test_login_vfc
(
self
,
param
):
print
(
param
[
"vfc_code"
])
r
=
account_request
()
.
login_vfc
(
param
[
"current_city_id"
],
param
[
"phone_num"
],
param
[
"vfc_code"
])
if
r
[
"error"
]
==
0
:
assert
r
[
"data"
][
"account_phone"
]
==
param
[
"assert"
]
if
r
[
"error"
]
==
1
:
assert
r
[
"message"
]
==
param
[
"assert"
]
test_backend_case/answer_case/test_vote.py
0 → 100644
View file @
233a7b7b
import
pytest
from
ids_list
import
get_ids
import
path_setting
from
in_common.base_request
import
BaseRequest
from
all_backend_api.answer_request
import
answer_request
class
TestVote
:
data
=
BaseRequest
()
.
api_load
(
path_setting
.
VOTE
)
vote_case
,
vote_data
=
get_ids
(
data
,
"vote"
)
@pytest.mark.parametrize
(
"param"
,
vote_data
,
ids
=
vote_case
)
def
test_vote
(
self
,
param
):
r
=
answer_request
()
.
vote
(
param
[
"answer_id"
])
if
r
[
"error"
]
==
1
:
assert
r
[
"message"
]
==
param
[
"assert"
]
test_backend_case/eyelids_case/__init__.py
0 → 100644
View file @
233a7b7b
test_backend_case/eyelids_case/test_diary_cards.py
0 → 100644
View file @
233a7b7b
import
pytest
from
ids_list
import
get_ids
import
path_setting
from
in_common.base_request
import
BaseRequest
from
all_backend_api.eyelids_request
import
eyelids_request
class
TestDiaryCards
:
data
=
BaseRequest
()
.
api_load
(
path_setting
.
EYELIDS_DIARY_CARDS_DATA
)
eyelidsDiaryCards_case
,
eyelidsDiaryCards_data
=
get_ids
(
data
,
"diary_cards"
)
@pytest.mark.skip
(
"跳过目前测试环境没有数据-------------------"
)
@pytest.mark.parametrize
(
"param"
,
eyelidsDiaryCards_data
,
ids
=
eyelidsDiaryCards_case
)
def
test_diary_cards
(
self
,
param
):
r
=
eyelids_request
()
.
diary_cards
(
param
[
"current_city_id"
],
param
[
"page"
],
param
[
"page_size"
],
param
[
"tag_names"
])
assert
r
[
"error"
]
==
0
assert
len
(
r
[
"data"
])
==
10
test_backend_case/gmai_case/test_simulate_analyze.py
View file @
233a7b7b
...
...
@@ -5,7 +5,7 @@ import path_setting
from
in_common.base_request
import
BaseRequest
from
all_backend_api.gmai_request
import
gmai_request
# 模拟发型
# 模拟发型
,眉毛,美瞳
class
TestSimulateAnalyze
:
data
=
BaseRequest
()
.
api_load
(
path_setting
.
GMAI_SIMULATE_ANALYZE_DATA
)
simulateanalyze_case
,
simulateanalyze_data
=
get_ids
(
data
,
"simulate_analyze"
)
...
...
test_backend_case/im_case/test_auto_msg.py
View file @
233a7b7b
...
...
@@ -6,13 +6,13 @@ from in_common.base_request import BaseRequest
from
all_backend_api.im_request
import
im_request
class
Test
ConversationDetail
:
class
Test
AutoMsg
:
data
=
BaseRequest
()
.
api_load
(
path_setting
.
AUTO_MSG
)
automsg_case
,
automsg_data
=
get_ids
(
data
,
"auto_msg"
)
@pytest.mark.parametrize
(
"param"
,
automsg_data
,
ids
=
automsg_case
)
def
test_
conversation_detail
(
self
,
param
):
r
=
im_request
()
.
auto_msg
(
param
[
"
version"
],
param
[
"uqid"
],
param
[
"
trace_id"
],
param
[
"conversation_id"
])
def
test_
auto_msg
(
self
,
param
):
r
=
im_request
()
.
auto_msg
(
param
[
"trace_id"
],
param
[
"conversation_id"
])
if
r
[
"error"
]
==
0
:
assert
r
[
"data"
][
"send_result"
]
==
param
[
"assert"
]
test_backend_case/im_case/test_send_msg.py
0 → 100644
View file @
233a7b7b
import
pytest
from
ids_list
import
get_ids
import
path_setting
from
in_common.base_request
import
BaseRequest
from
all_backend_api.im_request
import
im_request
class
TestSendMsg
:
data
=
BaseRequest
()
.
api_load
(
path_setting
.
SEND_MSG
)
sendmsg_case
,
sendmsg_data
=
get_ids
(
data
,
"send_msg"
)
@pytest.mark.parametrize
(
"param"
,
sendmsg_data
,
ids
=
sendmsg_case
)
def
test_send_msg
(
self
,
param
):
r
=
im_request
()
.
send_msg
(
param
[
"conversation_id"
],
param
[
"is_system"
],
param
[
"referrer"
],
param
[
"referrer_id"
],
param
[
"msg_type"
],
param
[
"content"
],
param
[
"extra"
])
print
(
r
)
if
r
[
"error"
]
==
0
:
assert
r
[
"data"
][
"conversation_type"
]
==
param
[
"assert_conversation_type"
]
assert
r
[
"data"
][
"message_type"
]
==
param
[
"assert_message_type"
]
if
r
[
"error"
]
==
1
:
assert
r
[
"message"
]
==
param
[
"assert_message"
]
test_backend_case/private_conversation/__init__.py
0 → 100644
View file @
233a7b7b
test_backend_case/private_conversation/test_private_conversation.py
0 → 100644
View file @
233a7b7b
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_case/question_case/__init__.py
0 → 100644
View file @
233a7b7b
#!/usr/bin/env python
# -*- coding:utf-8 -*-
test_backend_case/question_case/test_reply_answer.py
0 → 100644
View file @
233a7b7b
import
pytest
from
ids_list
import
get_ids
import
path_setting
from
in_common.base_request
import
BaseRequest
from
all_backend_api.question_request
import
question_request
class
TestReplyAnswer
:
data
=
BaseRequest
()
.
api_load
(
path_setting
.
REPLY_ANSWER
)
replyanswer_case
,
replyanswer_data
=
get_ids
(
data
,
"reply_answer"
)
@pytest.mark.parametrize
(
"param"
,
replyanswer_data
,
ids
=
replyanswer_case
)
def
test_reply_answer
(
self
,
param
):
r
=
question_request
()
.
reply_answer
(
param
[
"current_city_id"
],
param
[
"answer_id"
],
param
[
"content"
],
param
[
"user_id"
])
if
r
[
"message"
]
==
"操作成功"
:
assert
r
[
"message"
]
==
param
[
"assert"
]
test_backend_data/answer_data/__init__.py
0 → 100644
View file @
233a7b7b
#!/usr/bin/env python
# -*- coding:utf-8 -*-
test_backend_data/answer_data/cancel_vote.yaml
0 → 100644
View file @
233a7b7b
cancel_vote
:
-
case
:
"
接口正常case"
current_city_id
:
"
beijing"
answer_id
:
"
868312"
assert
:
"
"
test_backend_data/answer_data/detail.yaml
0 → 100644
View file @
233a7b7b
detail
:
#字段正常case
-
case
:
"
接口正常case"
current_city_id
:
"
beijing"
answer_id
:
"
868312"
assert
:
"
"
test_backend_data/answer_data/vote.yaml
0 → 100644
View file @
233a7b7b
vote
:
-
case
:
"
接口正常case"
answer_id
:
"
868312"
assert
:
"
"
test_backend_data/eyelids_data/__init__.py
0 → 100644
View file @
233a7b7b
test_backend_data/eyelids_data/diary_cards.yaml
0 → 100644
View file @
233a7b7b
diary_cards
:
-
case
:
"
模拟双眼皮"
current_city_id
:
"
beijing"
page
:
"
1"
page_size
:
"
10"
tag_names
:
'
["埋线双眼皮","定点双眼皮","切开双眼皮"]'
-
case
:
"
模拟发型"
current_city_id
:
"
beijing"
page
:
"
1"
page_size
:
"
10"
tag_names
:
'
["植发际线","美人尖植发","疤痕植发","pst微针植发","植发","注射瘦脸","眼综合","热玛吉","水光针","菲洛嘉","小棕瓶","微针祛痘"]'
test_backend_data/gmai_data/simulate_analyze.yaml
View file @
233a7b7b
...
...
@@ -13,4 +13,34 @@ simulate_analyze:
device_id
:
"
869412032478155"
image_url
:
"
2021/06/02/1456/68c702f50309"
style_id
:
6
type_id
:
7
\ No newline at end of file
type_id
:
7
#模拟眉毛
-
case
:
"
新月眉效果"
device_id
:
"
869412032478155"
image_url
:
"
2021/06/07/1447/56b2766d3ef3"
style_id
:
1
type_id
:
9
-
case
:
"
野生眉效果"
device_id
:
"
869412032478155"
image_url
:
"
2021/06/07/1447/56b2766d3ef3"
style_id
:
2
type_id
:
9
#模拟美瞳
-
case
:
"
天空蓝美瞳效果"
device_id
:
"
869412032478155"
image_url
:
"
2021/06/07/1451/86b01d9a9d66"
style_id
:
1
type_id
:
8
-
case
:
"
清新绿"
device_id
:
"
869412032478155"
image_url
:
"
2021/06/07/1451/86b01d9a9d66"
style_id
:
2
type_id
:
8
\ No newline at end of file
test_backend_data/im_data/auto_msg.yaml
View file @
233a7b7b
...
...
@@ -2,8 +2,6 @@ auto_msg:
#验证成功case
-
case
:
"
请求成功,有数据返回"
version
:
7.42
uqid
:
"
1B519701-A4F5-453E-9D99-140B5AF697A0"
trace_id
:
"
2021/04/22/1722/70a1791606d5"
conversation_id
:
368
assert
:
True
\ No newline at end of file
test_backend_data/im_data/send_msg.yaml
0 → 100644
View file @
233a7b7b
send_msg
:
#验证成功case
-
case
:
"
给咨询师发送消息成功"
#current_city_id: beijing
conversation_id
:
368
is_system
:
0
referrer
:
"
message_home"
referrer_id
:
"
"
msg_type
:
0
content
:
"
您好,我想咨询一下---"
extra
:
"
"
assert_conversation_type
:
4
assert_message_type
:
0
#验证失败case
-
case
:
"
给咨询师发送消息失败"
#current_city_id: beijing
conversation_id
:
463465
is_system
:
0
referrer
:
"
message_home"
referrer_id
:
"
"
msg_type
:
0
content
:
"
您好,我想咨询一下---"
extra
:
{}
assert_message
:
"
服务器开小差了~"
test_backend_data/private_conversation_data/__init__.py
0 → 100644
View file @
233a7b7b
test_backend_data/private_conversation_data/private_conversation.yaml
0 → 100644
View file @
233a7b7b
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
:
"
请登录"
test_backend_data/question_data/__init__.py
0 → 100644
View file @
233a7b7b
#!/usr/bin/env python
# -*- coding:utf-8 -*-
test_backend_data/question_data/reply_answer.yaml
0 → 100644
View file @
233a7b7b
reply_answer
:
-
case
:
"
接口正常case"
current_city_id
:
"
beijing"
answer_id
:
"
868312"
content
:
"
长知识了"
user_id
:
"
33910245"
assert
:
"
操作成功"
extra
:
{}
test_doctor_case/web2_case/test_service_list.py
View file @
233a7b7b
...
...
@@ -7,16 +7,21 @@ from in_common.base_request import BaseRequest
class
TestServiceList
:
data
=
BaseRequest
()
.
api_load
(
path_setting
.
SERVICE_DATA
)
ServiceList_case
,
ServiceList_data
=
get_ids
(
data
,
"service_list"
)
service_list
=
BaseRequest
()
.
api_load
(
path_setting
.
SERVICE_DATA
)
ServiceList_case
,
ServiceList_data
=
get_ids
(
service_list
,
"service_list"
)
@pytest.mark.parametrize
(
"params"
,
ServiceList_data
,
ids
=
ServiceList_case
)
def
test_ServiceList
(
self
,
params
):
r
=
web2_request
()
.
service_list
(
params
[
'page'
],
params
[
'pagesize'
],
params
[
'is_online'
])
r
=
web2_request
()
.
service_list
(
params
[
'page'
],
params
[
'pagesize'
],
params
[
'is_online'
],
params
[
'extra_filter_choice'
])
print
(
"======"
,
r
)
if
r
[
"error"
]
==
0
:
assert
r
[
"data"
][
"page"
]
==
params
[
"assert"
]
elif
r
[
"error"
]
==
1
:
assert
r
[
"message"
]
==
params
[
"assert"
]
# else:
# assert r['error'] == 0
\ No newline at end of file
# assert r['error'] == 0
test_doctor_case/web2_case/test_service_review_list.py
0 → 100644
View file @
233a7b7b
import
pytest
import
path_setting
from
all_doctor_api.web2_request
import
web2_request
from
ids_list
import
get_ids
from
in_common.base_request
import
BaseRequest
class
TestServiceReviewList
:
service_review_list
=
BaseRequest
()
.
api_load
(
path_setting
.
SERVICE_REVIEW_DATA
)
ServiceReviewList_case
,
ServiceReviewList_data
=
get_ids
(
service_review_list
,
"service_review_list"
)
@pytest.mark.parametrize
(
"params"
,
ServiceReviewList_data
,
ids
=
ServiceReviewList_case
)
def
test_ServiceReviewList
(
self
,
params
):
r
=
web2_request
()
.
service_review_list
(
params
[
'page'
],
params
[
'pagesize'
],
params
[
'type'
])
print
(
"--------"
,
r
)
if
r
[
"error"
]
==
0
:
assert
r
[
"data"
][
"page"
]
==
params
[
"assert"
]
# elif r["error"] == 1:
# assert r["message"] == params["assert"]
\ No newline at end of file
test_doctor_case/web2_case/test_servicereview_option.py
0 → 100644
View file @
233a7b7b
import
pytest
import
path_setting
from
all_doctor_api.web2_request
import
web2_request
from
ids_list
import
get_ids
from
in_common.base_request
import
BaseRequest
class
TestServicereviewOption
:
servicereview_option
=
BaseRequest
()
.
api_load
(
path_setting
.
SERVICEREVIEW_OPTION_DATA
)
ServicereviewOption_case
,
ServicereviewOption_data
=
get_ids
(
servicereview_option
,
"servicereview_option"
)
@pytest.mark.parametrize
(
"params"
,
ServicereviewOption_data
,
ids
=
ServicereviewOption_case
)
def
test_ServicereviewOption
(
self
,
params
):
r
=
web2_request
()
.
servicereview_option
(
params
[
'id'
],
params
[
'type'
],
params
[
'csrfmiddlewaretoken'
])
print
(
"--------"
,
r
)
if
r
[
"error"
]
==
0
:
assert
r
[
"error"
]
==
params
[
"assert"
]
print
(
"...."
)
# elif r["error"] == 1:
# assert r["data"] == params["assert"]
\ No newline at end of file
test_doctor_case/web2_case/test_tag_all.py
0 → 100644
View file @
233a7b7b
import
pytest
import
path_setting
from
all_doctor_api.web2_request
import
web2_request
from
ids_list
import
get_ids
from
in_common.base_request
import
BaseRequest
class
TestTagAll
:
tag_all
=
BaseRequest
()
.
api_load
(
path_setting
.
TAG_DATA
)
TagAll_case
,
TagAll_data
=
get_ids
(
tag_all
,
"tag_all"
)
@pytest.mark.parametrize
(
"param"
,
TagAll_data
,
ids
=
TagAll_case
)
def
test_TagAll
(
self
,
param
):
r
=
web2_request
()
.
tag_all
()
print
(
"--------"
,
r
)
if
r
[
"error"
]
==
0
:
assert
r
[
"error"
]
==
param
[
"assert"
]
# elif r["error"] == 1:
# assert r["data"] == params["assert"]
\ No newline at end of file
test_doctor_case/web_case/__init__.py
0 → 100644
View file @
233a7b7b
test_doctor_case/web_case/test_account_unreadbadgecount.py
0 → 100644
View file @
233a7b7b
import
pytest
import
path_setting
from
all_doctor_api.web_request
import
web_request
from
ids_list
import
get_ids
from
in_common.base_request
import
BaseRequest
class
TestAccountUnreadbadgecount
:
account_unreadbadgecount
=
BaseRequest
()
.
api_load
(
path_setting
.
ACCOUNT_DATA
)
AccountUnreadbadgecount_case
,
AccountUnreadbadgecount_data
=
get_ids
(
account_unreadbadgecount
,
"account_unreadbadgecount"
)
@pytest.mark.parametrize
(
"param"
,
AccountUnreadbadgecount_data
,
ids
=
AccountUnreadbadgecount_case
)
def
test_AccountUnreadbadgecount
(
self
,
param
):
r
=
web_request
()
.
account_unreadbadgecount
()
print
(
"====="
,
r
)
if
r
[
"error"
]
==
0
:
assert
r
[
"error"
]
==
param
[
"assert"
]
# elif r["error"] == 1:
# assert r["message"] == params["assert"]
\ No newline at end of file
test_doctor_case/web_case/test_article_videotoken.py
0 → 100644
View file @
233a7b7b
import
pytest
import
path_setting
from
all_doctor_api.web_request
import
web_request
from
ids_list
import
get_ids
from
in_common.base_request
import
BaseRequest
class
TestArticleVideotoken
:
article_videotoken
=
BaseRequest
()
.
api_load
(
path_setting
.
ARTICLE_DATA
)
ArticleVideotoken_case
,
ArticleVideotoken_data
=
get_ids
(
article_videotoken
,
"article_videotoken"
)
@pytest.mark.parametrize
(
"param"
,
ArticleVideotoken_data
,
ids
=
ArticleVideotoken_case
)
def
test_ArticleVideotokent
(
self
,
param
):
r
=
web_request
()
.
article_videotoken
()
print
(
"======="
,
r
)
if
r
[
"error"
]
==
0
:
assert
r
[
"error"
]
==
param
[
"assert"
]
# elif r["error"] == 1:
# assert r["message"] == params["assert"]
\ No newline at end of file
test_doctor_case/web_case/test_doctor_submechanisms.py
0 → 100644
View file @
233a7b7b
import
pytest
import
path_setting
from
all_doctor_api.web_request
import
web_request
from
ids_list
import
get_ids
from
in_common.base_request
import
BaseRequest
class
TestDoctorSubmechanisms
:
doctor_submechanisms
=
BaseRequest
()
.
api_load
(
path_setting
.
DOCTOR_DATA
)
DoctorSubmechanisms_case
,
DoctorSubmechanisms_data
=
get_ids
(
doctor_submechanisms
,
"doctor_submechanisms"
)
@pytest.mark.parametrize
(
"param"
,
DoctorSubmechanisms_data
,
ids
=
DoctorSubmechanisms_case
)
def
test_DoctorSubmechanisms_data
(
self
,
param
):
r
=
web_request
()
.
doctor_submechanisms
()
print
(
"======="
,
r
)
if
r
[
"error"
]
==
0
:
assert
r
[
"error"
]
==
param
[
"assert"
]
# elif r["error"] == 1:
# assert r["message"] == params["assert"]
\ No newline at end of file
test_doctor_data/web2_data/service_list.yaml
View file @
233a7b7b
service_list
:
#
有数据返回
#
我的商品菜单下有数据返回1
-
case
:
"
数据
"
case
:
"
我的商品-全部tab
"
page
:
"
1"
pagesize
:
"
10"
is_online
:
"
-1"
extra_filter_choice
:
"
-1"
assert
:
1
-
case
:
"
我的商品-上线tab"
page
:
"
1"
pagesize
:
"
10"
is_online
:
"
-1"
extra_filter_choice
:
"
-1"
assert
:
1
-
case
:
"
我的商品-下线tab"
page
:
"
1"
pagesize
:
"
10"
is_online
:
"
0"
extra_filter_choice
:
"
-1"
assert
:
1
-
case
:
"
我的商品-待升级(全部tab)"
page
:
"
1"
pagesize
:
"
10"
is_online
:
"
-1"
extra_filter_choice
:
"
0"
assert
:
1
-
case
:
"
我的商品-待修改类目(全部tab)有数据返回"
page
:
"
1"
pagesize
:
"
10"
is_online
:
"
-1"
extra_filter_choice
:
"
1"
assert
:
1
test_doctor_data/web2_data/service_review_list.yaml
0 → 100644
View file @
233a7b7b
service_review_list
:
#有数据返回
-
case
:
"
商品审核-新商品审核
"
page
:
"
1"
pagesize
:
"
10"
type
:
"
0"
assert
:
1
-
case
:
"
商品审核-商品修改审核"
page
:
"
1"
pagesize
:
"
10"
type
:
"
1"
assert
:
1
-
case
:
"
商品审核-新商品审核"
page
:
"
1"
pagesize
:
"
10"
type
:
"
2"
assert
:
1
test_doctor_data/web2_data/servicereview_option.yaml
0 → 100644
View file @
233a7b7b
servicereview_option
:
#有数据返回
-
case
:
"
新商品审核-撤回审核"
id
:
"
209989"
type
:
"
1"
csrfmiddlewaretoken
:
"
PC8uTySuxipukIMuqNV1OPB376C2ZZ3g"
assert
:
0
-
case
:
"
新商品审核-取消申请"
id
:
"
209744"
type
:
"
0"
csrfmiddlewaretoken
:
"
PC8uTySuxipukIMuqNV1OPB376C2ZZ3g"
assert
:
0
-
case
:
"
商品修改审核-撤回审核
"
id
:
"
209866"
type
:
"
1"
csrfmiddlewaretoken
:
"
PC8uTySuxipukIMuqNV1OPB376C2ZZ3g"
assert
:
0
-
case
:
"
新商品审核-取消申请"
id
:
"
209996"
type
:
"
0"
csrfmiddlewaretoken
:
"
PC8uTySuxipukIMuqNV1OPB376C2ZZ3g"
assert
:
0
test_doctor_data/web2_data/tag_all.yaml
0 → 100644
View file @
233a7b7b
tag_all
:
-
case
:
"
发布商品-选择类目跳转发布商品页面tag接口
"
assert
:
0
\ No newline at end of file
test_doctor_data/web_data/__init__.py
0 → 100644
View file @
233a7b7b
test_doctor_data/web_data/account_unreadbadgecount.yaml
0 → 100644
View file @
233a7b7b
account_unreadbadgecount
:
-
case
:
"
发布商品-选择类目跳转发布商品页面account接口
"
assert
:
0
\ No newline at end of file
test_doctor_data/web_data/article_videotoken.yaml
0 → 100644
View file @
233a7b7b
article_videotoken
:
-
case
:
"
发布商品-选择类目跳转发布商品页面article接口
"
assert
:
0
\ No newline at end of file
test_doctor_data/web_data/doctor_submechanisms.yaml
0 → 100644
View file @
233a7b7b
doctor_submechanisms
:
-
case
:
"
发布商品-选择类目跳转发布商品页面doctor接口
"
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