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
5ea5a5f8
Commit
5ea5a5f8
authored
Jul 09, 2021
by
aha
Browse files
Options
Browse Files
Download
Plain Diff
合并common_dev
parents
79e7cd41
b0e88e8d
Show whitespace changes
Inline
Side-by-side
Showing
74 changed files
with
817 additions
and
167 deletions
+817
-167
common_request.py
all_backend_api/common_request.py
+2
-2
common_request.yaml
all_backend_api/common_request.yaml
+2
-2
conversation_request.py
all_backend_api/conversation_request.py
+1
-0
diary_request.py
all_backend_api/diary_request.py
+1
-1
diary_request.yaml
all_backend_api/diary_request.yaml
+3
-2
feed_request.py
all_backend_api/feed_request.py
+31
-0
feed_request.yaml
all_backend_api/feed_request.yaml
+34
-0
hybrid_api_topic_request.py
all_backend_api/hybrid_api_topic_request.py
+2
-2
hybrid_api_topic_request.yaml
all_backend_api/hybrid_api_topic_request.yaml
+1
-1
hybrid_request.py
all_backend_api/hybrid_request.py
+10
-0
hybrid_request.yaml
all_backend_api/hybrid_request.yaml
+22
-0
janus_request.py
all_backend_api/janus_request.py
+45
-36
janus_request.yaml
all_backend_api/janus_request.yaml
+16
-0
live_request.py
all_backend_api/live_request.py
+0
-22
search_request.py
all_backend_api/search_request.py
+4
-0
search_request.yaml
all_backend_api/search_request.yaml
+1
-0
service_request.py
all_backend_api/service_request.py
+10
-0
service_request.yaml
all_backend_api/service_request.yaml
+16
-0
user_request.py
all_backend_api/user_request.py
+22
-0
user_request.yaml
all_backend_api/user_request.yaml
+23
-0
web2_request.py
all_doctor_api/web2_request.py
+12
-0
web2_request.yaml
all_doctor_api/web2_request.yaml
+17
-0
web_request.py
all_doctor_api/web_request.py
+5
-0
web_request.yaml
all_doctor_api/web_request.yaml
+9
-0
host.yaml
host.yaml
+3
-2
base_request.py
in_common/base_request.py
+1
-1
login_session_function.py
login_session_function.py
+6
-43
path_setting.py
path_setting.py
+40
-11
test_reply.py
test_backend_case/common_case/test_reply.py
+2
-2
test_reply_sub_reply.py
test_backend_case/common_case/test_reply_sub_reply.py
+2
-2
test_message_read.py
test_backend_case/conversation_case/test_message_read.py
+1
-0
test_operation.py
test_backend_case/diary_case/test_operation.py
+1
-0
test_update.py
test_backend_case/diary_case/test_update.py
+3
-7
test_free_recruit_detail.py
test_backend_case/feed_case/test_free_recruit_detail.py
+21
-0
test_user_status.py
test_backend_case/feed_case/test_user_status.py
+21
-0
test_winning_user_list.py
test_backend_case/feed_case/test_winning_user_list.py
+21
-0
test_answer_answer_reply_vote.py
...backend_case/hybrid_case/test_answer_answer_reply_vote.py
+40
-0
test_api_topic_vote.py
test_backend_case/hybrid_case/test_api_topic_vote.py
+4
-4
test_product_mall_service_home_feed.py
...nd_case/janus_case/test_product_mall_service_home_feed.py
+22
-0
test_home_feed.py
test_backend_case/service_case/test_home_feed.py
+22
-0
test_topic_reply_create.py
test_backend_case/topic_case/test_topic_reply_create.py
+25
-5
test_topic_reply_vote.py
test_backend_case/topic_case/test_topic_reply_vote.py
+4
-2
test_my_diary_v2.py
test_backend_case/user_case/test_my_diary_v2.py
+20
-0
test_user_tractate.py
test_backend_case/user_case/test_user_tractate.py
+19
-0
reply.yaml
test_backend_data/common_data/reply.yaml
+2
-2
sub_common.yaml
test_backend_data/common_data/sub_common.yaml
+2
-2
message_read.yaml
test_backend_data/conversation_data/message_read.yaml
+3
-3
diary_operation.yaml
test_backend_data/diary_data/diary_operation.yaml
+3
-2
diary_update.yaml
test_backend_data/diary_data/diary_update.yaml
+7
-0
free_recruit_detail.yaml
test_backend_data/feed_data/free_recruit_detail.yaml
+10
-0
index_v9.yaml
test_backend_data/feed_data/index_v9.yaml
+13
-0
user_status.yaml
test_backend_data/feed_data/user_status.yaml
+10
-0
winning_user_lis.yaml
test_backend_data/feed_data/winning_user_lis.yaml
+10
-0
answer_answer_reply_vote.yaml
test_backend_data/hybrid_data/answer_answer_reply_vote.yaml
+15
-0
send_msg.yaml
test_backend_data/im_data/send_msg.yaml
+1
-1
product_mall_service_home_feed.yaml
...ckend_data/janus_data/product_mall_service_home_feed.yaml
+24
-0
add_live_service.yaml
test_backend_data/janus_live_data/add_live_service.yaml
+3
-2
live_services.yaml
test_backend_data/janus_live_data/live_services.yaml
+2
-2
private_conversation.yaml
..._data/private_conversation_data/private_conversation.yaml
+1
-1
home_feed.yaml
test_backend_data/service_data/home_feed.yaml
+17
-0
topic_reply_create.yaml
test_backend_data/topic_data/topic_reply_create.yaml
+2
-1
my_diary_v2.yaml
test_backend_data/user_data/my_diary_v2.yaml
+14
-0
user_tractate.yaml
test_backend_data/user_data/user_tractate.yaml
+14
-0
test_artemis_ad_packageorder_detail.py
...tor_case/web2_case/test_artemis_ad_packageorder_detail.py
+25
-0
test_artemis_add_value_order_id_detail.py
..._case/web2_case/test_artemis_add_value_order_id_detail.py
+22
-0
test_artemis_order_list.py
test_doctor_case/web_case/test_artemis_order_list.py
+2
-0
test_conversation_coupon.py
test_doctor_case/web_case/test_conversation_coupon.py
+1
-1
test_cpc_community_homepage.py
test_doctor_case/web_case/test_cpc_community_homepage.py
+23
-0
artemis_ad_packageorder_detail.yaml
...doctor_data/web2_data/artemis_ad_packageorder_detail.yaml
+6
-0
artemis_add_value_order_id_detail.yaml
...tor_data/web2_data/artemis_add_value_order_id_detail.yaml
+5
-0
artemis_order_list.yaml
test_doctor_data/web_data/artemis_order_list.yaml
+2
-1
conversation_coupon.yaml
test_doctor_data/web_data/conversation_coupon.yaml
+1
-1
conversation_user_id.yaml
test_doctor_data/web_data/conversation_user_id.yaml
+1
-1
cpc_community_homepage.yaml
test_doctor_data/web_data/cpc_community_homepage.yaml
+9
-0
No files found.
all_backend_api/common_request.py
View file @
5ea5a5f8
...
...
@@ -9,13 +9,13 @@ class common_request(BaseRequest):
# 日记贴评论列表--一级评论列表
def
diary_common_reply
(
self
,
id
,
type
):
self
.
params
[
"id"
]
=
id
self
.
params
[
"type"
]
=
type
self
.
params
[
"
com_
type"
]
=
type
return
self
.
api_send
(
self
.
data
[
"reply_detail"
])
# 日记贴评论列表--二级评论
def
topic_sub_common
(
self
,
id
,
type
,
reply_id
):
self
.
params
[
"id"
]
=
id
self
.
params
[
"type"
]
=
type
self
.
params
[
"
com_
type"
]
=
type
self
.
params
[
"reply_id"
]
=
reply_id
return
self
.
api_send
(
self
.
data
[
"sub_common"
])
...
...
all_backend_api/common_request.yaml
View file @
5ea5a5f8
...
...
@@ -4,7 +4,7 @@ reply_detail:
url
:
/api/common/reply
params
:
id
:
${id}
type
:
${type}
type
:
${
com_
type}
data
:
{}
json
:
{}
isLogin
:
0
#需要登录添加这个字段,值为1 0是不需要登录的情况,如不需要登录,可以不添加这个字段
...
...
@@ -16,7 +16,7 @@ sub_common:
url
:
/api/common/reply/sub_reply
params
:
id
:
${id}
type
:
${type}
type
:
${
com_
type}
reply_id
:
${reply_id}
data
:
{}
json
:
{}
...
...
all_backend_api/conversation_request.py
View file @
5ea5a5f8
...
...
@@ -22,6 +22,7 @@ class conversation_request(BaseRequest):
if
__name__
==
'__main__'
:
print
(
conversation_request
()
.
message_read
(
"beijing"
,
1
,
'[10622,10626,10646,10651]'
))
print
(
"---------"
)
print
(
conversation_request
()
.
detail_messageid
(
10
,
0
,
0
))
...
...
all_backend_api/diary_request.py
View file @
5ea5a5f8
...
...
@@ -14,7 +14,7 @@ class diary_request(BaseRequest):
def
diary_cancelfavor
(
self
):
return
self
.
api_send
(
self
.
data
[
"cancelfavor"
])
# 更新日记本
# 更新日记本
无权限
def
diary_operation
(
self
,
diary_id
,
title
,
operation_timestamp
,
doctor_name
,
hospital_name
):
self
.
params
[
"diary_id"
]
=
diary_id
self
.
params
[
"title"
]
=
title
...
...
all_backend_api/diary_request.yaml
View file @
5ea5a5f8
...
...
@@ -33,10 +33,11 @@ operation:
isLogin
:
1
#需要登录添加这个字段,值为1 0是不需要登录的情况,如不需要登录,可以不添加这个字段
#查看日记修改信息页面
additional_info
:
method
:
get
url
:
/api/diary/operation/175861
98
/
url
:
/api/diary/operation/175861
47
/
params
:
data
:
{}
json
:
{}
...
...
@@ -71,7 +72,7 @@ diary_service:
#更新日记本的修改信息
update
:
method
:
post
url
:
/api/diary/update_v2/175861
98
url
:
/api/diary/update_v2/175861
47
params
:
data
:
topic_list
:
${topic_list}
...
...
all_backend_api/feed_request.py
View file @
5ea5a5f8
...
...
@@ -49,6 +49,27 @@ class feed_request(BaseRequest):
return
self
.
api_send
(
self
.
data
[
"free_recruit_list"
])
# 免费招募活动详情
def
free_recruit_detail
(
self
,
current_city_id
,
id
):
self
.
params
[
"current_city_id"
]
=
current_city_id
self
.
params
[
"id"
]
=
id
return
self
.
api_send
(
self
.
data
[
"free_recruit_detail"
])
# 招募活动获取用户抽奖状态
def
user_status
(
self
,
current_city_id
,
recruit_id
):
self
.
params
[
"current_city_id"
]
=
current_city_id
self
.
params
[
"recruit_id"
]
=
recruit_id
return
self
.
api_send
(
self
.
data
[
"user_status"
])
# 招募活动获取中奖名单
def
winning_user_lis
(
self
,
recruit_id
,
json
):
self
.
params
[
"recruit_id"
]
=
recruit_id
self
.
params
[
"json"
]
=
json
return
self
.
api_send
(
self
.
data
[
"winning_user_lis"
])
if
__name__
==
'__main__'
:
print
(
feed_request
()
.
index_v9
(
"choice"
,
"7.42.2"
,
"beijing"
))
...
...
@@ -61,3 +82,12 @@ if __name__ == '__main__':
# 免费招募列表
print
(
feed_request
()
.
free_recruit_list
(
"7.44.1"
,
" "
,
"1"
,
"1"
,
"10"
))
# 免费招募活动详情
print
(
feed_request
()
.
free_recruit_detail
(
"beijing"
,
"43"
))
# 免费招募获取用户状态
print
(
feed_request
()
.
user_status
(
"beijing"
,
"43"
))
# 免费招募查看中奖名单
print
(
feed_request
()
.
winning_user_lis
(
"44"
,
" "
))
\ No newline at end of file
all_backend_api/feed_request.yaml
View file @
5ea5a5f8
...
...
@@ -56,3 +56,36 @@ free_recruit_list:
data
:
json
:
{
}
isLogin
:
1
#招募活动详情
free_recruit_detail
:
method
:
get
url
:
/api/feed/free_recruit/detail
params
:
current_city_id
:
${current_city_id}
id
:
${id}
data
:
json
:
{
}
isLogin
:
1
#招募活动详情
user_status
:
method
:
get
url
:
/api/feed/free_recruit/user_status
params
:
current_city_id
:
${current_city_id}
recruit_id
:
${recruit_id}
data
:
json
:
{
}
isLogin
:
1
#招募活动查看中奖名单
winning_user_lis
:
method
:
get
url
:
/api/feed/free_recruit/winning_user_list
params
:
recruit_id
:
${recruit_id}
json
:
${json}
data
:
json
:
{
}
isLogin
:
1
\ No newline at end of file
all_backend_api/hybrid_api_topic_request.py
View file @
5ea5a5f8
...
...
@@ -10,9 +10,9 @@ class hybrid_api_topic_request(BaseRequest):
self
.
params
[
"id"
]
=
id
return
self
.
api_send
(
self
.
data
[
"vote"
])
def
diary_canc
le
vote
(
self
,
id
):
def
diary_canc
el
vote
(
self
,
id
):
self
.
params
[
"id"
]
=
id
return
self
.
api_send
(
self
.
data
[
"canc
le
vote"
])
return
self
.
api_send
(
self
.
data
[
"canc
el
vote"
])
# 进入日记贴详情页-用来判断这篇日记贴点赞过没
def
diary_detail
(
self
,
topic_id
):
...
...
all_backend_api/hybrid_api_topic_request.yaml
View file @
5ea5a5f8
...
...
@@ -9,7 +9,7 @@ vote:
isLogin
:
1
#需要登录添加这个字段,值为1 0是不需要登录的情况,如不需要登录,可以不添加这个字段
#取消点赞
canc
le
vote
:
canc
el
vote
:
method
:
post
url
:
/hybrid/api/topic/cancel_vote/_data
params
:
...
...
all_backend_api/hybrid_request.py
View file @
5ea5a5f8
...
...
@@ -50,6 +50,16 @@ class hybrid_request(BaseRequest):
self
.
params
[
'question_id'
]
=
question_id
return
self
.
api_send
(
self
.
data
[
'question_new_answer_list'
])
# 回答详情页评论点赞
def
answer_reply_vote
(
self
,
id
):
self
.
params
[
'id'
]
=
id
return
self
.
api_send
(
self
.
data
[
'answer_reply_vote'
])
def
answer_reply_cancel_vote
(
self
,
id
):
self
.
params
[
'id'
]
=
id
return
self
.
api_send
(
self
.
data
[
'answer_reply_cancel_vote'
])
...
...
all_backend_api/hybrid_request.yaml
View file @
5ea5a5f8
...
...
@@ -61,3 +61,25 @@ question_new_answer_list:
isLogin
:
1
# 回答详情页评论点赞
answer_reply_vote
:
method
:
post
url
:
/hybrid/answer/answer_reply_vote/_data
params
:
data
:
id
:
${id}
json
:
{}
isLogin
:
1
# 回答详情页评论取消点赞
answer_reply_cancel_vote
:
method
:
post
url
:
/hybrid/answer/answer_reply_cancel_vote/_data
params
:
data
:
id
:
${id}
json
:
{}
isLogin
:
1
all_backend_api/janus_request.py
View file @
5ea5a5f8
...
...
@@ -22,9 +22,6 @@ class janus_request(BaseRequest):
#次卡商详页
self
.
data
=
self
.
api_load
(
path_setting
.
BEAUTY_CARD_DETAIL_CONFIG
)
#直播-点击【设置封面】
self
.
data
=
self
.
api_load
(
path_setting
.
PAGE_RULES_CONFIG
)
#搜索结果页-综合/百科tab
def
content_v7
(
self
,
query
,
device_id
,
current_city_id
,
version
,
is_first
,
tab_type
,
offset
):
#搜索词
...
...
@@ -215,6 +212,16 @@ class janus_request(BaseRequest):
return
self
.
api_send
(
self
.
data
[
"service_hospital"
])
# 首页(灰度)feed-推荐商品类型tab[除必要参数外其余参数使用默认参数形式方便之后调整]
def
feed_service
(
self
,
tab_value
,
first_load
,
version
=
'7.42.2'
,
device_id
=
'androidid_49973caa1b578d85'
,
current_city_id
=
'beijing'
):
self
.
params
[
'version'
]
=
version
self
.
params
[
'device_id'
]
=
device_id
self
.
params
[
'tab_value'
]
=
tab_value
self
.
params
[
'current_city_id'
]
=
current_city_id
self
.
params
[
'first_load'
]
=
first_load
return
self
.
api_send
(
self
.
data
[
"feed_service"
])
# 直播-点击【设置封面】
def
page_rules
(
self
,
version
,
current_city_id
,
page_name
,
device_id
=
'97B6764B-2135-4761-9911-701C38CBC272'
):
self
.
params
[
'version'
]
=
version
...
...
@@ -223,38 +230,40 @@ class janus_request(BaseRequest):
return
self
.
api_send
(
self
.
data
[
"page_rules"
])
if
__name__
==
'__main__'
:
#
#
打印购物车-猜你喜欢列表接口返回
#
print(janus_request().mine_guess_you_like())
#
#
打印商祥页-详情接口返回
#
print(janus_request().product_detail("5857263", "618788", "7.43.0"))
#
#
打印商祥页-sku信息接口返回
#
print(janus_request().sku_info("5857263", "618788"))
#
#
打印商祥页-美券列表-我的美券点击-744版本及以后-新接口返回
#
print(janus_request().product_coupon_my_list(0, 0))
#
#
#
品类聚合页面商品列表接口返回
#
print(janus_request().tag_service())
#
print("fgx")
#
#
#
品类聚合页面标签和专场
#
print(janus_request().polymer())
#
print("fgx")
#
#
#
打印次卡-确认订单接口返回
#
print(janus_request().beauty_card_order_confirm("10176", 1, 1, 0))
#
#
打印次卡-确认订单页面-修改手机号接口返回
#
print(janus_request().beauty_card_update_phone("+8612348543876", 1, "084430"))
#
#
打印次卡-提交订单接口返回
#
print(janus_request().beauty_card_order_submit("12345678912", "10176", 1, 1, 0, 0))
#
#
打印次卡-支付平台接口返回
#
print(janus_request().beauty_card_payment_method("101670448736595"))
#
#
print(janus_request().product_my_list(0, 0))
#
#
次卡商详页-适应机构
#
print(janus_request().beauty_card_detail("100018", "10046", "100018", "7.44.0", "beijing", "40.001879", "116.487194"))
#
#
次卡商详页
#
print(janus_request().service_hospital("0", "10046", "1", "7.44.0", "beijing", "40.001879", "116.487194"))
#打印购物车-猜你喜欢列表接口返回
print
(
janus_request
()
.
mine_guess_you_like
())
#打印商祥页-详情接口返回
print
(
janus_request
()
.
product_detail
(
"5857263"
,
"618788"
,
"7.43.0"
))
#打印商祥页-sku信息接口返回
print
(
janus_request
()
.
sku_info
(
"5857263"
,
"618788"
))
#打印商祥页-美券列表-我的美券点击-744版本及以后-新接口返回
print
(
janus_request
()
.
product_coupon_my_list
(
0
,
0
))
#品类聚合页面商品列表接口返回
print
(
janus_request
()
.
tag_service
())
print
(
"fgx"
)
#品类聚合页面标签和专场
print
(
janus_request
()
.
polymer
())
print
(
"fgx"
)
#打印次卡-确认订单接口返回
print
(
janus_request
()
.
beauty_card_order_confirm
(
"10176"
,
1
,
1
,
0
))
#打印次卡-确认订单页面-修改手机号接口返回
print
(
janus_request
()
.
beauty_card_update_phone
(
"+8612348543876"
,
1
,
"084430"
))
#打印次卡-提交订单接口返回
print
(
janus_request
()
.
beauty_card_order_submit
(
"12345678912"
,
"10176"
,
1
,
1
,
0
,
0
))
#打印次卡-支付平台接口返回
print
(
janus_request
()
.
beauty_card_payment_method
(
"101670448736595"
))
print
(
janus_request
()
.
product_my_list
(
0
,
0
))
# 次卡商详页-适应机构
print
(
janus_request
()
.
beauty_card_detail
(
"100018"
,
"10046"
,
"100018"
,
"7.44.0"
,
"beijing"
,
"40.001879"
,
"116.487194"
))
# 次卡商详页
print
(
janus_request
()
.
service_hospital
(
"0"
,
"10046"
,
"1"
,
"7.44.0"
,
"beijing"
,
"40.001879"
,
"116.487194"
))
# #打印购物车-猜你喜欢列表接口返回
# print(janus_request().mine_guess_you_like())
# #打印商祥页-详情接口返回
...
...
@@ -290,9 +299,9 @@ if __name__ == '__main__':
# print(janus_request().beauty_card_payment_delete("101353630959868"))
# #打印次卡-申请退款接口返回
# print(janus_request().beauty_card_refund_info("102217820485006"))
#
#
打印次卡-提交退款申请接口返回
#打印次卡-提交退款申请接口返回
# print(janus_request().beauty_card_refund_submit("102813852173916", 3, "个人身体原因", 0))
#
print(janus_request().beauty_card_order_detail(102247770691611))
print
(
janus_request
()
.
beauty_card_order_detail
(
102247770691611
))
# print(janus_request().product_my_list(0, 0))
#直播-点击【设置封面】
print
(
"直播-点击【设置封面】"
)
...
...
all_backend_api/janus_request.yaml
View file @
5ea5a5f8
...
...
@@ -285,6 +285,7 @@ beauty_card_order_detail:
json
:
{}
isLogin
:
1
#直播-点击【设置封面】
page_rules
:
method
:
GET
...
...
@@ -296,3 +297,18 @@ page_rules:
data
:
{}
json
:
{}
isLogin
:
1
#首页(灰度)feed-推荐商品类型tab[除必要参数外其余参数使用默认参数形式方便之后调整]
feed_service
:
method
:
get
url
:
/api/janus/product/mall/service_home_feed
params
:
version
:
${version}
device_id
:
${device_id}
current_city_id
:
${current_city_id}
tab_value
:
${tab_value}
first_load
:
${first_load}
data
:
{}
json
:
{}
isLogin
:
0
all_backend_api/live_request.py
View file @
5ea5a5f8
...
...
@@ -5,7 +5,6 @@ from in_common.base_request import BaseRequest
class
living_request
(
BaseRequest
):
def
__init__
(
self
):
self
.
data
=
self
.
api_load
(
path_setting
.
LIVEYAML_CONFIG
)
self
.
data
=
self
.
api_load
(
path_setting
.
LIVESERVICES_CONFIG
)
#获取弹幕
def
danmu_v2
(
self
,
channel_id
,
msg_id
,
user_id
=
""
):
self
.
params
[
"channel_id"
]
=
channel_id
...
...
@@ -22,27 +21,8 @@ class living_request(BaseRequest):
self
.
params
[
"device_type"
]
=
device_type
return
self
.
api_send
(
self
.
data
[
"pushlive_info"
])
#主播-推荐袋美购列表展示
def
live_services
(
self
,
channel_id
,
stream_id
,
offset
,
size
):
self
.
params
[
"channel_id"
]
=
channel_id
self
.
params
[
"stream_id"
]
=
stream_id
self
.
params
[
"offset"
]
=
offset
self
.
params
[
"size"
]
=
size
return
self
.
api_send
(
self
.
data
[
"live_services"
])
#主播-推荐袋商品捜索功能
def
search_services
(
self
,
current_city_id
,
channel_id
,
query
,
offset
,
size
,
trace_id
,
device_id
=
'97B6764B-2135-4761-9911-701C38CBC272'
):
self
.
params
[
"current_city_id"
]
=
current_city_id
self
.
params
[
"channel_id"
]
=
channel_id
self
.
params
[
"query"
]
=
query
self
.
params
[
"offset"
]
=
offset
self
.
params
[
"size"
]
=
size
self
.
params
[
"trace_id"
]
=
trace_id
return
self
.
api_send
(
self
.
data
[
"search_services"
])
if
__name__
==
'__main__'
:
(
living_request
()
.
danmu_v2
(
"739"
,
"1"
))
(
living_request
()
.
pushlive_info
(
"小冤家"
,
"2021/04/22/1003/cef471cff5e6"
,
""
,
"1"
,
"1"
,
"1"
))
\ No newline at end of file
print
(
living_request
()
.
live_services
(
"745"
,
"4177"
,
"0"
,
"10"
))
print
(
living_request
()
.
search_services
(
"beijing"
,
"745"
,
""
,
"0"
,
"20"
,
"2021/06/28/1750/9fc690d5e66f"
))
\ No newline at end of file
all_backend_api/search_request.py
View file @
5ea5a5f8
...
...
@@ -52,7 +52,11 @@ class search_request(BaseRequest):
self
.
params
[
"device_id"
]
=
device_id
return
self
.
api_send
(
self
.
data
[
"hospital"
])
if
__name__
==
'__main__'
:
# 打印购物车-猜你喜欢列表接口返回
print
(
search_request
()
.
hospital
(
82
,
[],
"眼部整形"
,
10
,
"869378034450718"
))
all_backend_api/search_request.yaml
View file @
5ea5a5f8
...
...
@@ -49,3 +49,4 @@ hospital:
device_id
:
${device_id}
data
:
{}
json
:
{}
all_backend_api/service_request.py
View file @
5ea5a5f8
...
...
@@ -15,6 +15,16 @@ class service_request(BaseRequest):
def
service_favor
(
self
):
return
self
.
api_send
(
self
.
data
[
"service_favor"
])
# 首页(灰度)feed-推荐机构&推荐医生tab[除必要参数外其余参数使用默认参数形式方便之后调整]
def
feed_home
(
self
,
tab_value
,
input_type
,
version
=
'7.42.2'
,
device_id
=
'androidid_49973caa1b578d85'
,
current_city_id
=
'beijing'
):
self
.
params
[
'version'
]
=
version
self
.
params
[
'device_id'
]
=
device_id
self
.
params
[
'tab_value'
]
=
tab_value
self
.
params
[
'current_city_id'
]
=
current_city_id
self
.
params
[
'input_type'
]
=
input_type
return
self
.
api_send
(
self
.
data
[
"feed_home"
])
if
__name__
==
'__main__'
:
print
(
service_request
()
.
home_v5
())
...
...
all_backend_api/service_request.yaml
View file @
5ea5a5f8
...
...
@@ -16,3 +16,18 @@ service_favor:
data
:
{}
json
:
{}
isLogin
:
1
#首页(灰度)feed-推荐机构&推荐医生tab[除必要参数外其余参数使用默认参数形式方便之后调整]
feed_home
:
method
:
get
url
:
/api/service/home/feed
params
:
version
:
${version}
device_id
:
${device_id}
current_city_id
:
${current_city_id}
tab_value
:
${tab_value}
input_type
:
${input_type}
data
:
{}
json
:
{}
isLogin
:
0
\ No newline at end of file
all_backend_api/user_request.py
View file @
5ea5a5f8
...
...
@@ -33,6 +33,23 @@ class user_request(BaseRequest):
return
self
.
api_send
(
self
.
data
[
"canclefavor"
])
#我的-日记
def
my_diary_v2
(
self
,
start_num
,
count
):
self
.
params
[
"start_num"
]
=
start_num
self
.
params
[
"count"
]
=
count
return
self
.
api_send
(
self
.
data
[
"my_diary_v2"
])
# 我的-日记
def
user_tractate
(
self
,
page
,
count
):
self
.
params
[
"page"
]
=
page
self
.
params
[
"count"
]
=
count
return
self
.
api_send
(
self
.
data
[
"user_tractate"
])
if
__name__
==
'__main__'
:
#个人中心
...
...
@@ -47,4 +64,9 @@ if __name__ == '__main__':
# print(user_request().topic_canclefavor())
#我的-日记
print
(
user_request
()
.
my_diary_v2
(
0
,
10
))
#我的-帖子
print
(
user_request
()
.
user_tractate
(
1
,
10
))
all_backend_api/user_request.yaml
View file @
5ea5a5f8
...
...
@@ -38,3 +38,25 @@ canclefavor:
json
:
{}
isLogin
:
1
# 我的-日记
my_diary_v2
:
method
:
GET
url
:
/api/user/my_diary/v2
params
:
start_num
:
${start_num}
count
:
${count}
data
:
{}
json
:
{}
isLogin
:
1
# 我的-帖子
user_tractate
:
method
:
GET
url
:
/api/user/tractate
params
:
page
:
${page}
count
:
${count}
data
:
{}
json
:
{}
isLogin
:
1
\ No newline at end of file
all_doctor_api/web2_request.py
View file @
5ea5a5f8
...
...
@@ -48,6 +48,15 @@ class web2_request(BaseRequest):
def
artemis_ad_add_shopping_cart_info
(
self
):
#我的购物车
return
self
.
api_send
(
self
.
SERVICE_URL
[
"artemis_ad_add_shopping_cart_info"
])
def
artemis_add_value_order_id_detail
(
self
):
"我的服务订单-已购买"
return
self
.
api_send
(
self
.
SERVICE_URL
[
"artemis_add_value_order_id_detail"
])
def
artemis_ad_packageorder_detail
(
self
,
package_order_id
):
"我的服务订单-已支付广告包"
self
.
params
[
"package_order_id"
]
=
package_order_id
return
self
.
api_send
(
self
.
SERVICE_URL
[
"artemis_ad_packageorder_detail"
])
...
...
@@ -60,4 +69,7 @@ if __name__ == '__main__':
print
(
web2_request
()
.
service_delete
(
"1"
,
"209863"
,
"PC8uTySuxipukIMuqNV1OPB376C2ZZ3g"
))
print
(
web2_request
()
.
service_deletelist
(
"1"
))
#商品回收站
print
(
web2_request
()
.
artemis_ad_add_shopping_cart_info
())
print
(
web2_request
()
.
artemis_add_value_order_id_detail
())
print
(
"---11233353667----"
)
print
(
web2_request
()
.
artemis_ad_packageorder_detail
(
"685529883901"
))
all_doctor_api/web2_request.yaml
View file @
5ea5a5f8
...
...
@@ -74,3 +74,19 @@ artemis_ad_add_shopping_cart_info:
data
:
{}
json
:
{}
isLogin
:
1
#需要登录
artemis_add_value_order_id_detail
:
method
:
get
url
:
/api/web2/artemis/add_value_order/957727877165/detail
params
:
{}
data
:
{}
json
:
{}
isLogin
:
1
#需要登录
artemis_ad_packageorder_detail
:
method
:
get
url
:
/api/web2/artemis/ad/packageorder/detail
params
:
package_order_id
:
${package_order_id}
data
:
{}
json
:
{}
isLogin
:
1
#需要登录
\ No newline at end of file
all_doctor_api/web_request.py
View file @
5ea5a5f8
...
...
@@ -72,6 +72,9 @@ class web_request(BaseRequest):
def
artemis_order_id_detail
(
self
):
"上线中订单详情页"
return
self
.
api_send
(
self
.
ACCOUNT_URL
[
"artemis_order_id_detail"
])
def
cpc_community_homepage
(
self
):
"点点通-内容-概览"
return
self
.
api_send
(
self
.
ACCOUNT_URL
[
"cpc_community_homepage"
])
...
...
@@ -97,3 +100,4 @@ if __name__ == '__main__':
print
(
web_request
()
.
artemis_order_list
(
1
,
1
))
print
(
web_request
()
.
artemis_order_list
(
2
,
1
))
print
(
web_request
()
.
artemis_order_id_detail
())
print
(
web_request
()
.
cpc_community_homepage
())
\ No newline at end of file
all_doctor_api/web_request.yaml
View file @
5ea5a5f8
...
...
@@ -154,3 +154,11 @@ artemis_order_id_detail:
data
:
{}
json
:
{}
isLogin
:
1
#需要登录
cpc_community_homepage
:
method
:
get
url
:
/api/web/cpc_community/homepage
params
:
{}
data
:
{}
json
:
{}
isLogin
:
1
#需要登录
\ No newline at end of file
host.yaml
View file @
5ea5a5f8
develop_host
:
backend
:
http://backend.paas-develop.env
om
:
http://om.paas-develop.env
# doctor: http://doctor.paas-develop.env
# backend: https://backend.igengmei.com
doctor
:
http://doctor.paas-develop.env
# backend_online: https://backend.igengmei.com
in_common/base_request.py
View file @
5ea5a5f8
...
...
@@ -59,7 +59,7 @@ class BaseRequest:
s
=
requests
if
req
.
get
(
'isLogin'
):
s
=
LoginFunction
()
.
get_session
()
s
=
LoginFunction
()
.
get_session
(
host_service
)
# 调用具体case的url
r
=
s
.
request
(
...
...
login_session_function.py
View file @
5ea5a5f8
...
...
@@ -15,56 +15,20 @@ class LoginFunction:
with
open
(
path
,
encoding
=
'utf-8'
)
as
f
:
return
yaml
.
safe_load
(
f
)
def
get_session
(
self
):
hostList
=
self
.
host
[
'develop_host'
]
for
key
in
hostList
:
if
'backend'
==
key
:
return
self
.
get_develop_session
()
if
'doctor'
==
key
:
return
self
.
get_doctor_session
()
elif
'om'
==
key
:
return
self
.
get_om_session
()
def
get_develop_session
(
self
):
url
=
self
.
host
[
"develop_host"
][
"backend"
]
+
self
.
params
[
"backend_login"
][
"url"
]
def
get_session
(
self
,
host_service
):
project_login
=
host_service
+
"_login"
url
=
self
.
host
[
"develop_host"
][
host_service
]
+
self
.
params
[
project_login
][
"url"
]
s
=
requests
.
session
()
r
=
s
.
request
(
self
.
params
[
"backend_login"
][
"method"
],
self
.
params
[
project_login
][
"method"
],
url
=
url
,
params
=
self
.
params
[
"backend_login"
][
"params"
],
data
=
self
.
params
[
"backend_login"
][
"data"
],
params
=
self
.
params
[
project_login
][
"params"
],
data
=
self
.
params
[
project_login
][
"data"
],
headers
=
{
'Connection'
:
'close'
},
# verify=False
)
return
s
def
get_doctor_session
(
self
):
url
=
self
.
host
[
"develop_host"
][
"doctor"
]
+
self
.
params
[
"doctor_login"
][
"url"
]
s
=
requests
.
session
()
r
=
s
.
request
(
self
.
params
[
"doctor_login"
][
"method"
],
url
=
url
,
params
=
self
.
params
[
"doctor_login"
][
"params"
],
data
=
self
.
params
[
"doctor_login"
][
"data"
],
headers
=
{
'Connection'
:
'close'
}
)
return
s
def
get_om_session
(
self
):
url
=
self
.
host
[
"develop_host"
][
"om"
]
+
self
.
params
[
"om_login"
][
"url"
]
s
=
requests
.
session
()
r
=
s
.
request
(
self
.
params
[
"om_login"
][
"method"
],
url
=
url
,
params
=
self
.
params
[
"om_login"
][
"params"
],
data
=
self
.
params
[
"om_login"
][
"data"
],
headers
=
{
'Connection'
:
'close'
}
)
return
s
if
__name__
==
'__main__'
:
LoginFunction
()
.
get_session
()
\ No newline at end of file
path_setting.py
View file @
5ea5a5f8
...
...
@@ -15,16 +15,13 @@ DIARY_CONFIG = os.path.join(BASE_DIR, "backend_auto/all_backend_api", "diary_req
#日记本详情页--字段判空
DIARY_DATA
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_backend_data/diary_data"
,
"topic_data.yaml"
)
#日记本关联美购
DIARY_SERVICE_CONFIG
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/all_backend_api"
,
"diary_service.yaml"
)
DIARY_SERVICE
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_backend_data/diary_data"
,
"diary_service.yaml"
)
#日记本收藏&取消收藏
DIARY_FAVOR
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_backend_data/diary_data"
,
"favor.yaml"
)
# 日记本修改日记信息operation--目前好像直接用接口写无权限稍后解决
DIARY_OPERATION_CONFIG
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/all_backend_api"
,
"diary_operation.yaml"
)
DIARY_OPERATION
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_backend_data/diary_data"
,
"diary_operation.yaml"
)
# 日记本创建日记贴信息-
DIARY_UPDATE_CONFIG
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/all_backend_api"
,
"diary_update.yaml"
)
DIARY_UPDATE
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_backend_data/diary_data"
,
"diary_update.yaml"
)
...
...
@@ -33,8 +30,6 @@ DIARY_ALBUM_CONFIG = os.path.join(BASE_DIR, "backend_auto/all_backend_api", "hyb
DIARY_ALBUM
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_backend_data/hybrid_data"
,
"diary_album.yaml"
)
# 日记本列表-日记贴点赞相关()
DIARY_VOTE_CONFIG
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/all_backend_api"
,
"hybrid_api_topic_request.yaml"
)
DIARY_VOTE
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_backend_data/hybrid_data"
,
"api_topic_vote.yaml"
)
...
...
@@ -76,8 +71,6 @@ TOPIC_DETAIL = os.path.join(BASE_DIR, "backend_auto/test_backend_data/topic_data
TOPIC_VOTE
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_backend_data/topic_data"
,
"vote.yaml"
)
# 帖子详情页内容--也是总的tractate接口的配置
TRACTATE_CONFIG
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/all_backend_api"
,
"tractate_request.yaml"
)
# 帖子详情页内容
...
...
@@ -108,6 +101,17 @@ QA_FAVOR = os.path.join(BASE_DIR, "backend_auto/test_backend_data/qa_data", "fav
# TEST_QA = os.path.join(BASE_DIR, "backend_auto/test_backend_data/qa_data", "test.yaml")
# 回答评论点赞&取消点赞
QA_REPLY_VOTE
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_backend_data/hybrid_data"
,
"answer_answer_reply_vote.yaml"
)
# 首页feed流tab切换--推荐商品类型tab[除必要参数外其余参数使用默认参数形式方便之后调整]
FEED_TAB_SERVICE
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_backend_data/janus_data"
,
"product_mall_service_home_feed.yaml"
)
# 首页(灰度)feed-推荐机构&推荐医生tab[除必要参数外其余参数使用默认参数形式方便之后调整]
FEED_TAB_SERVICE_DOCTORS
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_backend_data/service_data"
,
"home_feed.yaml"
)
#搜索首页-热门搜索
KEYWORDS_CONFIG
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/all_backend_api"
,
"search_request.yaml"
)
...
...
@@ -139,9 +143,6 @@ TAG_DATA=os.path.join(BASE_DIR, "backend_auto/test_doctor_data/web2_data", "tag_
#医生后台 - 发布商品选择类目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"
)
#医生后台-保存新增商品
REGISTER_URL
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/all_doctor_api"
,
"glmer_request.yaml"
)
...
...
@@ -426,10 +427,16 @@ ADTYPELIST=os.path.join(BASE_DIR, "backend_auto/test_doctor_data/web_data", "art
ADADDSHOPPINGCARTINFO
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_doctor_data/web2_data"
,
"artemis_ad_add_shopping_cart_info.yaml"
)
#医生后台-我的服务订单
ORDERLIST
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_doctor_data/web_data"
,
"artemis_order_list.yaml"
)
#医生后台-我的服务订单-已上线订单
#医生后台-我的服务订单-已上线
/待审核/待上线/已下线
订单
ORDERIDDETAIL
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_doctor_data/web_data"
,
"artemis_order_id_detail.yaml"
)
#医生后台-我的服务订单-已购买订单
VALUEORDERIDDETAIL
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_doctor_data/web2_data"
,
"artemis_add_value_order_id_detail.yaml"
)
#医生后台-我的服务订单-已购买广告包
ADPACKAGEORDERDETAIL
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_doctor_data/web2_data"
,
"artemis_ad_packageorder_detail.yaml"
)
#医生后台-点点通商品-概览
CPCHOMEPAGE
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_doctor_data/web_data"
,
"cpc_homepage.yaml"
)
#医生后台-点点通内容-概览
CPCCOMMUNITYHOMEPAGE
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_doctor_data/web_data"
,
"cpc_community_homepage.yaml"
)
#更美次卡橱窗组件商品
VISUAL_BEAUTY_CARD_SERVICES_CONFIG
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/all_backend_api"
,
"visual_beauty_card.yaml"
)
...
...
@@ -521,6 +528,7 @@ FREE_RECRUIT_LIST = os.path.join(BASE_DIR, "backend_auto/test_backend_data/feed_
PAGE_RULES_CONFIG
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/all_backend_api"
,
"janus_request.yaml"
)
PAGE_RULES
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_backend_data/janus_data"
,
"page_rules.yaml"
)
#主播-推荐袋美购列表展示
LIVESERVICES_CONFIG
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/all_backend_api"
,
"janus_live_request.yaml"
)
LIVESERVICES
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_backend_data/janus_live_data"
,
"live_services.yaml"
)
...
...
@@ -549,5 +557,26 @@ DELETELIVESERVICE = os.path.join(BASE_DIR, "backend_auto/test_backend_data/janus
DELETEGIFT_CONFIG
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/all_backend_api"
,
"janus_live_request.yaml"
)
DELETEGIFT
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_backend_data/janus_live_data"
,
"delete_live_gift.yaml"
)
#免费招募活动详情
FREE_RECRUIT_DETAIL_CONFIG
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/all_backend_api"
,
"feed_request.yaml"
)
FREE_RECRUIT_DETAIL
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_backend_data/feed_data"
,
"free_recruit_detail.yaml"
)
#免费招募获取用户抽奖状态
USER_STATUS_CONFIG
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/all_backend_api"
,
"feed_request.yaml"
)
USER_STATUS
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_backend_data/feed_data"
,
"user_status.yaml"
)
#免费招募活动查看中奖名单
WINNING_USER_LIST_CONFIG
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/all_backend_api"
,
"feed_request.yaml"
)
WINNING_USER_LIST
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_backend_data/feed_data"
,
"winning_user_lis.yaml"
)
#我的-日记
MY_DIARY_V2_CONFIG
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/all_backend_api"
,
"user_request.yaml"
)
MY_DIARY_V2
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_backend_data/user_data"
,
"my_diary_v2.yaml"
)
#我的-帖子
USER_TRACTATE_CONFIG
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/all_backend_api"
,
"user_request.yaml"
)
USER_TRACTATE
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_backend_data/user_data"
,
"user_tractate.yaml"
)
if
__name__
==
'__main__'
:
print
(
"=========="
,
LIVEYAML_CONFIG
)
test_backend_case/common_case/test_reply.py
View file @
5ea5a5f8
...
...
@@ -13,12 +13,12 @@ class TestReply:
@pytest.mark.parametrize
(
"param"
,
diary_common_reply_data
,
ids
=
diary_common_reply_case
)
def
test_reply
(
self
,
param
):
# 日记贴的评论列表
r
=
common_request
()
.
diary_common_reply
(
param
[
"id"
],
param
[
"type"
])
r
=
common_request
()
.
diary_common_reply
(
param
[
"id"
],
param
[
"
com_
type"
])
# print(r)
if
r
[
"error"
]
==
0
:
assert
r
[
"error"
]
==
param
[
"assert1"
]
# 先判断有没有评论,然后判断里面需要的那些字段,如点赞字段,评论总数等,不传值,传空值
if
r
[
"data"
][
"reply_data"
]:
if
r
[
"data"
][
"reply_data"
]
and
(
param
[
"assert1"
]
==
2
)
:
assert
r
[
"data"
][
"reply_data"
][
0
][
"user_id"
]
is
not
None
and
r
[
"data"
][
"reply_data"
][
0
][
"user_id"
]
is
not
""
# 用户id
assert
r
[
"data"
][
"reply_data"
][
0
][
"user_portrait"
]
is
not
None
and
r
[
"data"
][
"reply_data"
][
0
][
"user_portrait"
]
is
not
""
# 用户头像
assert
r
[
"data"
][
"reply_data"
][
0
][
"gm_url"
]
is
not
None
and
r
[
"data"
][
"reply_data"
][
0
][
"gm_url"
]
is
not
""
# 头像跳转链接
...
...
test_backend_case/common_case/test_reply_sub_reply.py
View file @
5ea5a5f8
...
...
@@ -13,7 +13,7 @@ class TestRrplySubReply:
@pytest.mark.parametrize
(
"param"
,
topic_sub_common_data
,
ids
=
topic_sub_common_case
)
def
test_reply_sub_reply
(
self
,
param
):
# print(2)
r
=
common_request
()
.
topic_sub_common
(
param
[
"id"
],
param
[
"type"
],
param
[
"reply_id"
])
r
=
common_request
()
.
topic_sub_common
(
param
[
"id"
],
param
[
"
com_
type"
],
param
[
"reply_id"
])
# print(r)
if
r
[
"error"
]
==
0
:
assert
r
[
"error"
]
==
param
[
"assert1"
]
...
...
@@ -26,7 +26,7 @@ class TestRrplySubReply:
assert
r
[
"data"
][
0
][
"content"
]
is
not
None
and
r
[
"data"
][
0
][
"content"
]
is
not
""
# 评论内容
assert
r
[
"data"
][
0
][
"comment_user_id"
]
is
not
None
and
r
[
"data"
][
0
][
"comment_user_id"
]
is
not
""
# 评论人
assert
r
[
"data"
][
0
][
"comment_id"
]
is
not
None
and
r
[
"data"
][
0
][
"comment_id"
]
is
not
""
# 评论id
assert
r
[
"data"
][
"reply_data"
][
0
][
"_type"
]
==
param
[
"type"
]
# 校验评论列表返回类型
#
assert r["data"]["reply_data"][0]["_type"] == param["type"] # 校验评论列表返回类型
...
...
test_backend_case/conversation_case/test_message_read.py
View file @
5ea5a5f8
...
...
@@ -15,6 +15,7 @@ class TestMessageRead:
@pytest.mark.parametrize
(
"param"
,
messageread_data
,
ids
=
messageread_case
)
def
test_message_read
(
self
,
param
):
r
=
conversation_request
()
.
message_read
(
param
[
"current_city_id"
],
param
[
"release"
],
param
[
"message_ids"
])
print
(
r
)
if
r
[
"error"
]
==
0
:
assert
r
[
"data"
][
"success"
]
==
param
[
"assert"
]
#if r["error"] == 0:
...
...
test_backend_case/diary_case/test_operation.py
View file @
5ea5a5f8
...
...
@@ -20,6 +20,7 @@ class TestDiaryOperation:
#
test_backend_case/diary_case/test_update.py
View file @
5ea5a5f8
...
...
@@ -17,15 +17,11 @@ class TestDiaryUpdate:
# if r["error"] == 0:
# assert r["message"] == param["assert"]
if
r
[
"error"
]
==
1
:
assert
r
[
"message"
]
==
param
[
"assert"
]
# 收藏之后取消收藏
# r1 = diary_isfavor_request().diary_cancelfavor()
# if r["error"] == 0:
# assert r["error"] == param["assert"]
assert
r
[
"message"
]
==
param
[
"message"
]
# 校验--如果是因为发布频繁导致的错误就不用理会-如果是其他再判断
# 收藏之后取消收藏?为啥能成功?
...
...
test_backend_case/feed_case/test_free_recruit_detail.py
0 → 100644
View file @
5ea5a5f8
import
pytest
from
ids_list
import
get_ids
import
path_setting
from
in_common.base_request
import
BaseRequest
from
all_backend_api.feed_request
import
feed_request
class
TestFreeRecruitDetail
:
data
=
BaseRequest
()
.
api_load
(
path_setting
.
FREE_RECRUIT_DETAIL
)
free_recruit_detail_case
,
free_recruit_detail_data
=
get_ids
(
data
,
"free_recruit_detail"
)
@pytest.mark.parametrize
(
"param"
,
free_recruit_detail_data
,
ids
=
free_recruit_detail_case
)
def
test_free_recruit_detail_case
(
self
,
param
):
r
=
feed_request
()
.
free_recruit_detail
(
param
[
"current_city_id"
],
param
[
"id"
])
if
r
[
"error"
]
==
0
:
assert
r
[
"data"
][
"free_recruit"
][
"id"
]
!=
param
[
"assert"
]
test_backend_case/feed_case/test_user_status.py
0 → 100644
View file @
5ea5a5f8
import
pytest
from
ids_list
import
get_ids
import
path_setting
from
in_common.base_request
import
BaseRequest
from
all_backend_api.feed_request
import
feed_request
class
TestUserStatus
:
data
=
BaseRequest
()
.
api_load
(
path_setting
.
USER_STATUS
)
user_status_case
,
user_status_data
=
get_ids
(
data
,
"user_status"
)
@pytest.mark.parametrize
(
"param"
,
user_status_data
,
ids
=
user_status_case
)
def
test_user_status_case
(
self
,
param
):
r
=
feed_request
()
.
user_status
(
param
[
"current_city_id"
],
param
[
"id"
])
if
r
[
"error"
]
==
0
:
assert
r
[
"data"
][
"is_regist"
]
==
param
[
"assert"
]
test_backend_case/feed_case/test_winning_user_list.py
0 → 100644
View file @
5ea5a5f8
import
pytest
from
ids_list
import
get_ids
import
path_setting
from
in_common.base_request
import
BaseRequest
from
all_backend_api.feed_request
import
feed_request
class
TestWinningUserList
:
data
=
BaseRequest
()
.
api_load
(
path_setting
.
WINNING_USER_LIST
)
winning_user_list_case
,
winning_user_list_data
=
get_ids
(
data
,
"winning_user_lis"
)
@pytest.mark.parametrize
(
"param"
,
winning_user_list_data
,
ids
=
winning_user_list_case
)
def
test_winning_user_list_case
(
self
,
param
):
r
=
feed_request
()
.
winning_user_lis
(
param
[
"recruit_id"
],
param
[
"json"
])
if
r
[
"error"
]
==
0
:
assert
r
[
"data"
][
"users"
][
0
][
"id"
]
!=
param
[
"assert"
]
test_backend_case/hybrid_case/test_answer_answer_reply_vote.py
0 → 100644
View file @
5ea5a5f8
import
pytest
from
ids_list
import
get_ids
import
path_setting
from
in_common.base_request
import
BaseRequest
from
all_backend_api.hybrid_request
import
hybrid_request
class
TestAnswerAnswerReplyVote
:
data
=
BaseRequest
()
.
api_load
(
path_setting
.
QA_REPLY_VOTE
)
test_case
,
test_data
=
get_ids
(
data
,
"answer_reply_vote"
)
@pytest.mark.parametrize
(
"param"
,
test_data
,
ids
=
test_case
)
def
test_answer_answer_reply_vote
(
self
,
param
):
# 直接点赞,看是否能点赞,如果返回1,就直接进入取消点赞
vote
=
hybrid_request
()
.
answer_reply_vote
(
param
[
"id"
])
if
vote
[
"error"
]
==
0
:
print
(
1
)
# 校验二次点赞无效
vote
=
hybrid_request
()
.
answer_reply_vote
(
param
[
"id"
])
assert
vote
[
"message"
]
==
param
[
"assert3"
]
assert
vote
[
"error"
]
==
1
# 取消点赞,回到取消点赞的状态
cancelvote
=
hybrid_request
()
.
answer_reply_cancel_vote
(
param
[
"id"
])
assert
cancelvote
[
"error"
]
==
0
print
(
2
)
else
:
assert
vote
[
"error"
]
==
1
assert
vote
[
"message"
]
==
param
[
"assert3"
]
# 取消点赞,回到取消点赞的状态
cancelvote
=
hybrid_request
()
.
answer_reply_cancel_vote
(
param
[
"id"
])
assert
cancelvote
[
"error"
]
==
0
print
(
2
)
test_backend_case/hybrid_case/test_api_topic_vote.py
View file @
5ea5a5f8
...
...
@@ -29,13 +29,13 @@ class TestDiaryVote:
assert
vote
[
"message"
]
==
param
[
"assert3"
]
assert
vote
[
"error"
]
==
1
# 取消点赞,回到取消点赞的状态
canc
levote
=
hybrid_api_topic_request
()
.
diary_cancle
vote
(
param
[
"id"
])
assert
canc
le
vote
[
"error"
]
==
0
canc
elvote
=
hybrid_api_topic_request
()
.
diary_cancel
vote
(
param
[
"id"
])
assert
canc
el
vote
[
"error"
]
==
0
else
:
# 如果是已经点过赞的状态就直接取消点赞
# print(111)
canc
levote
=
hybrid_api_topic_request
()
.
diary_cancle
vote
(
param
[
"id"
])
assert
canc
le
vote
[
"error"
]
==
0
canc
elvote
=
hybrid_api_topic_request
()
.
diary_cancel
vote
(
param
[
"id"
])
assert
canc
el
vote
[
"error"
]
==
0
...
...
test_backend_case/janus_case/test_product_mall_service_home_feed.py
0 → 100644
View file @
5ea5a5f8
import
pytest
from
ids_list
import
get_ids
import
path_setting
from
in_common.base_request
import
BaseRequest
from
all_backend_api.janus_request
import
janus_request
class
TestProductMallServiceHomeFeed
:
data
=
BaseRequest
()
.
api_load
(
path_setting
.
FEED_TAB_SERVICE
)
test_case
,
test_data
=
get_ids
(
data
,
"feed_service"
)
@pytest.mark.parametrize
(
"param"
,
test_data
,
ids
=
test_case
)
def
test_product_mall_service_home_feed
(
self
,
param
):
r
=
janus_request
()
.
feed_service
(
param
[
"tab_value"
],
param
[
"first_load"
])
assert
r
[
"error"
]
==
0
if
r
[
"error"
]
==
0
:
features
=
r
.
get
(
"data"
)
.
get
(
"result"
,[])
print
(
len
(
features
))
assert
len
(
features
)
>
param
[
"assert"
]
test_backend_case/service_case/test_home_feed.py
0 → 100644
View file @
5ea5a5f8
import
pytest
from
ids_list
import
get_ids
import
path_setting
from
in_common.base_request
import
BaseRequest
from
all_backend_api.service_request
import
service_request
class
TestProductMallServiceHomeFeed
:
data
=
BaseRequest
()
.
api_load
(
path_setting
.
FEED_TAB_SERVICE_DOCTORS
)
test_case
,
test_data
=
get_ids
(
data
,
"home_feed"
)
@pytest.mark.parametrize
(
"param"
,
test_data
,
ids
=
test_case
)
def
test_product_mall_service_home_feed
(
self
,
param
):
r
=
service_request
()
.
feed_home
(
param
[
"tab_value"
],
param
[
"input_type"
])
assert
r
[
"error"
]
==
0
if
r
[
"error"
]
==
0
:
s
=
param
[
"tab_value"
]
+
"s"
features
=
r
[
"data"
][
s
]
assert
len
(
features
)
>
param
[
"assert"
]
test_backend_case/topic_case/test_topic_reply_create.py
View file @
5ea5a5f8
import
time
import
yaml
import
pytest
import
os
import
sys
from
ids_list
import
get_ids
import
path_setting
...
...
@@ -33,8 +35,26 @@ class TestTopicReplyCreate:
# 运行完用例后修改topic_reply_create.yaml文件里的content内容避免下一次重复,工作路径是backend_auto,用的是相对路径
a_path
=
"test_backend_data/topic_data/topic_reply_create.yaml"
with
open
(
a_path
,
"r"
,
encoding
=
"utf-8"
)
as
f
:
project_path2
=
os
.
getcwd
()
dd1
=
os
.
path
.
split
(
project_path2
)
dd
=
os
.
path
.
split
(
project_path2
)[
1
]
if
dd
==
"backend_auto"
:
path_test
=
dd1
[
0
]
+
"/backend_auto/test_backend_data/topic_data/topic_reply_create.yaml"
elif
dd
==
"test_backend_case"
:
path_test
=
dd1
[
0
]
+
"/test_backend_data/topic_data/topic_reply_create.yaml"
elif
dd
==
"topic_case"
:
path_test
=
os
.
path
.
split
(
dd1
[
0
])[
0
]
+
"/test_backend_data/topic_data/topic_reply_create.yaml"
else
:
i
=
0
while
dd
!=
"backend_auto"
:
dd1
=
os
.
path
.
split
(
dd1
[
0
])[
0
]
dd
=
os
.
path
.
split
(
dd1
)[
1
]
i
=
i
+
1
if
i
>
6
:
break
path_test
=
dd1
+
"/test_backend_data/topic_data/topic_reply_create.yaml"
with
open
(
path_test
,
"r"
,
encoding
=
"utf-8"
)
as
f
:
res
=
yaml
.
load
(
f
,
Loader
=
yaml
.
FullLoader
)
a_content
=
res
[
"reply_create"
][
0
][
"content"
]
a_new_content
=
"ces测试+"
+
str
(
time
.
strftime
(
'
%
Y-
%
m-
%
d
%
H:
%
M:
%
S'
,
time
.
localtime
(
time
.
time
())))
...
...
@@ -42,7 +62,7 @@ class TestTopicReplyCreate:
for
k
in
res
[
"reply_create"
][
0
]:
if
k
==
"content"
:
res
[
"reply_create"
][
0
][
k
]
=
a_new_content
with
open
(
a_path
,
"w"
,
encoding
=
"utf-8"
)
as
f
:
with
open
(
path_test
,
"w"
,
encoding
=
"utf-8"
)
as
f
:
yaml
.
dump
(
res
,
f
,
encoding
=
'utf-8'
,
allow_unicode
=
True
)
#
#
test_backend_case/topic_case/test_topic_reply_vote.py
View file @
5ea5a5f8
...
...
@@ -6,6 +6,8 @@ from in_common.base_request import BaseRequest
from
all_backend_api.topicreply_vote_request
import
topicreply_vote_request
class
TestTopicReplyVote
:
data
=
BaseRequest
()
.
api_load
(
path_setting
.
TOPIC_REPLY_VOTE
)
topic_reply_vote_case
,
topic_reply_vote_data
=
get_ids
(
data
,
"topic_reply_vote"
)
...
...
@@ -17,8 +19,8 @@ class TestTopicReplyVote:
if
r
[
"error"
]
==
1
:
assert
r
[
"message"
]
==
param
[
"assert3"
]
# 回到取消点赞状态
canc
le
vote
=
topicreply_vote_request
()
.
topic_reply_cancelvote
(
param
[
"id"
])
assert
canc
le
vote
[
"error"
]
==
0
canc
el
vote
=
topicreply_vote_request
()
.
topic_reply_cancelvote
(
param
[
"id"
])
assert
canc
el
vote
[
"error"
]
==
0
# 校验点赞
vote
=
topicreply_vote_request
()
.
topic_reply_vote
(
param
[
"id"
])
assert
vote
[
"error"
]
==
0
...
...
test_backend_case/user_case/test_my_diary_v2.py
0 → 100644
View file @
5ea5a5f8
import
pytest
from
ids_list
import
get_ids
import
path_setting
from
in_common.base_request
import
BaseRequest
from
all_backend_api.user_request
import
user_request
class
TestMyDiaryV2
:
data
=
BaseRequest
()
.
api_load
(
path_setting
.
MY_DIARY_V2
)
mydiaryv2_case
,
mydiaryv2_data
=
get_ids
(
data
,
"my_diary_v2"
)
@pytest.mark.parametrize
(
"param"
,
mydiaryv2_data
,
ids
=
mydiaryv2_case
)
def
test_my_diary_v2
(
self
,
param
):
r
=
user_request
()
.
my_diary_v2
(
param
[
"start_num"
],
param
[
"count"
])
if
r
[
"error"
]
==
0
:
# assert r["data"]["diaries"] >= param["assert"]
assert
len
(
r
[
"data"
][
"diaries"
])
>=
param
[
"assert"
]
test_backend_case/user_case/test_user_tractate.py
0 → 100644
View file @
5ea5a5f8
import
pytest
from
ids_list
import
get_ids
import
path_setting
from
in_common.base_request
import
BaseRequest
from
all_backend_api.user_request
import
user_request
class
TestUserTractate
:
data
=
BaseRequest
()
.
api_load
(
path_setting
.
USER_TRACTATE
)
user_tractate_case
,
user_tractate_data
=
get_ids
(
data
,
"user_tractate"
)
@pytest.mark.parametrize
(
"param"
,
user_tractate_data
,
ids
=
user_tractate_case
)
def
test_user_tractate
(
self
,
param
):
r
=
user_request
()
.
user_tractate
(
param
[
"page"
],
param
[
"count"
])
if
r
[
"error"
]
==
0
:
assert
len
(
r
[
"data"
][
"tractates"
])
>=
param
[
"assert"
]
test_backend_data/common_data/reply.yaml
View file @
5ea5a5f8
...
...
@@ -3,13 +3,13 @@ common_reply:
-
case
:
"
日记本列表评论列表--校验"
id
:
21250007
type
:
2
com_
type
:
2
assert1
:
0
type
:
"
TOPIC"
-
case
:
"
帖子列表评论列表--校验"
id
:
82208
type
:
4
com_
type
:
4
assert1
:
0
type
:
"
TRACTATE"
...
...
test_backend_data/common_data/sub_common.yaml
View file @
5ea5a5f8
...
...
@@ -3,7 +3,7 @@ topic_sub_common:
-
case
:
"
日记贴二级评论列表--展示--用户信息校验"
id
:
21249632
type
:
2
com_
type
:
2
reply_id
:
35526987
assert1
:
0
assert2
:
"
请登录后再试"
...
...
@@ -14,7 +14,7 @@ topic_sub_common:
-
case
:
"
贴子二级评论列表--展示--用户信息校验"
id
:
2087079
type
:
4
com_
type
:
4
reply_id
:
2087079
assert1
:
0
assert2
:
"
请登录后再试"
...
...
test_backend_data/conversation_data/message_read.yaml
View file @
5ea5a5f8
...
...
@@ -5,5 +5,5 @@ message_read:
current_city_id
:
"
beijing"
release
:
1
#uqid: "1B519701-A4F5-453E-9D99-140B5AF697A0"
message_ids
:
[
10622
,
10626
,
10646
,
10651
]
assert
:
"
true"
\ No newline at end of file
message_ids
:
"
[10622,10626,10646,10651]"
assert
:
True
\ No newline at end of file
test_backend_data/diary_data/diary_operation.yaml
View file @
5ea5a5f8
...
...
@@ -2,7 +2,7 @@ diary_operation:
#修改日记本信息case--
-
case
:
"
修改信息"
diary_id
:
175861
98
diary_id
:
175861
47
title
:
"
上海哈哈哈哈哈哈哈哈哈哈哈虎骨"
operation_timestamp
:
1620662400
doctor_name
:
"
也一样"
...
...
@@ -12,7 +12,7 @@ diary_operation:
-
case
:
"
将原来的修改内容修改回去,方便下次接着使用"
diary_id
:
175861
98
diary_id
:
175861
47
title
:
"
测试"
operation_timestamp
:
1620662401
doctor_name
:
"
测试"
...
...
@@ -23,6 +23,7 @@ diary_operation:
#
#diary_cancelfavor:
#-
# case: "取消收藏case"
...
...
test_backend_data/diary_data/diary_update.yaml
View file @
5ea5a5f8
...
...
@@ -6,6 +6,13 @@ diary_update:
status
:
true
assert
:
"
没有权限"
isLogin
:
1
error1
:
1
message
:
"
为避免恶意发布,请间隔30s后再发"
message7
:
"
没有权限"
...
...
test_backend_data/feed_data/free_recruit_detail.yaml
0 → 100644
View file @
5ea5a5f8
free_recruit_detail
:
#社区免费招募活动详情
-
case
:
"
招募活动详情图片"
current_city_id
:
"
beijing"
assert
:
null
id
:
43
test_backend_data/feed_data/index_v9.yaml
View file @
5ea5a5f8
...
...
@@ -6,3 +6,15 @@ index_v9:
tabtype
:
"
choice"
version
:
"
7.42.2"
assert
:
0
-
case
:
"
推荐内容/接口请求成功,有数据返回"
current_city_id
:
"
beijing"
tabtype
:
"
home_video"
version
:
"
7.42.2"
assert
:
0
-
case
:
"
直播tab接口请求成功,有数据返回"
current_city_id
:
"
beijing"
tabtype
:
"
customize_commodity"
version
:
"
7.42.2"
assert
:
0
\ No newline at end of file
test_backend_data/feed_data/user_status.yaml
0 → 100644
View file @
5ea5a5f8
user_status
:
#免费招募获取用户抽奖状态
-
case
:
"
招募活动获取用户抽奖"
current_city_id
:
"
beijing"
assert
:
true
id
:
43
test_backend_data/feed_data/winning_user_lis.yaml
0 → 100644
View file @
5ea5a5f8
winning_user_lis
:
#免费招募活动查看中奖名单
-
case
:
"
招募活动查看中奖名单"
recruit_id
:
"
44"
json
:
assert
:
null
test_backend_data/hybrid_data/answer_answer_reply_vote.yaml
0 → 100644
View file @
5ea5a5f8
answer_reply_vote
:
#点赞case--评论点赞
-
case
:
"
回答评论点赞--点赞&取消点赞成功case--校验"
id
:
5477513
assert1
:
0
assert2
:
"
请登录后再试"
assert3
:
"
操作不允许"
-
case
:
"
回答评论点赞--点赞&取消点赞成功case--校验"
id
:
5477513
assert1
:
0
assert2
:
"
请登录后再试"
assert3
:
"
操作不允许"
test_backend_data/im_data/send_msg.yaml
View file @
5ea5a5f8
...
...
@@ -15,7 +15,7 @@ send_msg:
#验证失败case
-
case
:
"
给咨询师发送消息失败
"
case
:
"
参数传值错误case:提示—服务器开小差了~
"
#current_city_id: beijing
conversation_id
:
463465
is_system
:
0
...
...
test_backend_data/janus_data/product_mall_service_home_feed.yaml
0 → 100644
View file @
5ea5a5f8
feed_service
:
#成功登录case
-
case
:
"
请求成功,有数据返回"
current_city_id
:
"
beijing"
tab_value
:
"
choice"
version
:
"
7.42.2"
first_load
:
1
assert
:
0
-
case
:
"
推荐内容/接口请求成功,有数据返回"
current_city_id
:
"
beijing"
tab_value
:
"
home_video"
version
:
"
7.42.2"
first_load
:
1
assert
:
0
-
case
:
"
直播tab接口请求成功,有数据返回"
current_city_id
:
"
beijing"
tab_value
:
"
customize_commodity"
first_load
:
1
version
:
"
7.42.2"
assert
:
0
\ No newline at end of file
test_backend_data/janus_live_data/add_live_service.yaml
View file @
5ea5a5f8
...
...
@@ -2,7 +2,7 @@ add_live_service:
#主播-推荐袋添加商品-添加一个商品
-
case
:
"
主播-推荐袋添加商品-添加一个商品"
channel_id
:
"
74
5
"
channel_id
:
"
74
7
"
service_item_ids
:
"
560641"
version
:
"
7.45.0"
assert
:
成功添加1件商品
...
...
@@ -10,7 +10,7 @@ add_live_service:
#主播-推荐袋添加商品-添加多个商品
-
case
:
"
主播-推荐袋添加商品-添加多个商品"
channel_id
:
"
74
5
"
channel_id
:
"
74
7
"
service_item_ids
:
"
108278,578088,585823"
version
:
"
7.45.0"
assert
:
成功添加3件商品
\ No newline at end of file
test_backend_data/janus_live_data/live_services.yaml
View file @
5ea5a5f8
...
...
@@ -2,8 +2,8 @@ live_services:
#主播-推荐袋美购列表正常展示
-
case
:
"
主播-推荐袋美购列表正常展示"
channel_id
:
"
74
5
"
channel_id
:
"
74
6
"
stream_id
:
"
4181"
offset
:
"
0"
size
:
"
20"
assert
:
0
assert
:
2
0
test_backend_data/private_conversation_data/private_conversation.yaml
View file @
5ea5a5f8
...
...
@@ -15,7 +15,7 @@ private_conversation:
#验证成功case
-
case
:
"
发送消息成功
"
case
:
"
未登录case:提示请登录
"
content
:
"
你好"
target_uid
:
358749351
referrer
:
"
message_home"
...
...
test_backend_data/service_data/home_feed.yaml
0 → 100644
View file @
5ea5a5f8
home_feed
:
#成功登录case
-
case
:
"
推荐医生.接口请求成功,有数据返回"
current_city_id
:
"
beijing"
tab_value
:
"
doctor"
version
:
"
7.42.2"
input_type
:
3
assert
:
0
-
case
:
"
推荐医院,接口请求成功,有数据返回"
current_city_id
:
"
beijing"
tab_value
:
"
hospital"
version
:
"
7.42.2"
input_type
:
3
assert
:
0
test_backend_data/topic_data/topic_reply_create.yaml
View file @
5ea5a5f8
reply_create
:
-
assert1
:
null
beuzhu
:
'
#
备注:
这个文件有冲突的话,那个版本都行不会影响,回退/接受当前版本都行,因为每次运行content都会改变'
case
:
日记贴一级评论创建--正常校验&创建二级评论--正常校验
channel
:
benzhan
content
:
ces测试+2021-0
6-18 19:16:10
content
:
ces测试+2021-0
7-09 18:49:02
message
:
请勿回复重复内容
message1
:
回复成功
message2
:
你的回复有点频繁,稍后再来
...
...
test_backend_data/user_data/my_diary_v2.yaml
0 → 100644
View file @
5ea5a5f8
my_diary_v2
:
#我的-日记
-
case
:
"
我的页面-日记"
start_num
:
0
count
:
20
assert
:
0
test_backend_data/user_data/user_tractate.yaml
0 → 100644
View file @
5ea5a5f8
user_tractate
:
-
#我的-帖子
case
:
"
我的页面-帖子"
page
:
1
count
:
10
assert
:
0
test_doctor_case/web2_case/test_artemis_ad_packageorder_detail.py
0 → 100644
View file @
5ea5a5f8
import
pytest
from
ids_list
import
get_ids
import
path_setting
from
in_common.base_request
import
BaseRequest
from
all_doctor_api.web2_request
import
web2_request
class
TestArtemisAdPackageorderDetail
:
data
=
BaseRequest
()
.
api_load
(
path_setting
.
ADPACKAGEORDERDETAIL
)
adpackageorderdetail_case
,
adpackageorderdetail_data
=
get_ids
(
data
,
"artemis_ad_packageorder_detail"
)
@pytest.mark.parametrize
(
"param"
,
adpackageorderdetail_data
,
ids
=
adpackageorderdetail_case
)
def
test_artemis_ad_packageorder_detail
(
self
,
param
):
'''我的服务订单-已支付广告包'''
r
=
web2_request
()
.
artemis_ad_packageorder_detail
(
param
[
"package_order_id"
])
print
(
r
)
if
r
[
"error"
]
==
0
:
advertise_source
=
r
.
get
(
"data"
)
.
get
(
"info"
)
.
get
(
"advertise_source"
,
[])
#ExtendValue["info"] = json.loads(ExtendValue["info"])
assert
len
(
advertise_source
)
>
param
[
"assert"
]
test_doctor_case/web2_case/test_artemis_add_value_order_id_detail.py
0 → 100644
View file @
5ea5a5f8
import
pytest
from
ids_list
import
get_ids
import
path_setting
from
in_common.base_request
import
BaseRequest
from
all_doctor_api.web2_request
import
web2_request
class
TestArtemisAddValueOrderIdDetail
:
data
=
BaseRequest
()
.
api_load
(
path_setting
.
VALUEORDERIDDETAIL
)
addvalueorderiddetail_case
,
addvalueorderiddetail_data
=
get_ids
(
data
,
"artemis_add_value_order_id_detail"
)
@pytest.mark.parametrize
(
"param"
,
addvalueorderiddetail_data
,
ids
=
addvalueorderiddetail_case
)
def
test_artemis_add_value_order_id_detail
(
self
,
param
):
'''我的服务订单-已购买'''
r
=
web2_request
()
.
artemis_add_value_order_id_detail
()
if
r
[
"error"
]
==
0
:
assert
r
[
"data"
][
"status"
]
==
param
[
"assert"
]
test_doctor_case/web_case/test_artemis_order_list.py
View file @
5ea5a5f8
...
...
@@ -18,4 +18,6 @@ class TestArtemisOrderList:
if
r
[
"error"
]
==
0
:
orders
=
r
.
get
(
"data"
)
.
get
(
"orders"
,
[])
assert
len
(
orders
)
>=
param
[
"assert"
]
if
r
[
"error"
]
==
300002
:
assert
r
[
"message"
]
==
param
[
"assert_message"
]
test_doctor_case/web_case/test_conversation_coupon.py
View file @
5ea5a5f8
...
...
@@ -6,7 +6,7 @@ from in_common.base_request import BaseRequest
from
all_doctor_api.web_request
import
web_request
class
Test
Service
:
class
Test
ConversationCoupon
:
data
=
BaseRequest
()
.
api_load
(
path_setting
.
CONVERSATIONCOUPON
)
conversationcoupon_case
,
conversationcoupon_data
=
get_ids
(
data
,
"conversation_coupon"
)
...
...
test_doctor_case/web_case/test_cpc_community_homepage.py
0 → 100644
View file @
5ea5a5f8
import
pytest
from
ids_list
import
get_ids
import
path_setting
from
in_common.base_request
import
BaseRequest
from
all_doctor_api.web_request
import
web_request
class
TestCpcCommunityHomepage
:
data
=
BaseRequest
()
.
api_load
(
path_setting
.
CPCCOMMUNITYHOMEPAGE
)
cpccommunityhomepage_case
,
cpccommunityhomepage_data
=
get_ids
(
data
,
"cpc_community_homepage"
)
@pytest.mark.parametrize
(
"param"
,
cpccommunityhomepage_data
,
ids
=
cpccommunityhomepage_case
)
def
test_cpc_community_homepage
(
self
,
param
):
'''点点通-概览'''
r
=
web_request
()
.
cpc_community_homepage
()
if
r
[
"error"
]
==
0
:
if
r
[
"data"
][
"account"
]
<=
"0"
:
assert
r
[
"data"
][
"is_cpc"
]
==
param
[
"assert"
]
else
:
assert
r
[
"data"
][
"is_cpc"
]
==
param
[
"assert1"
]
test_doctor_data/web2_data/artemis_ad_packageorder_detail.yaml
0 → 100644
View file @
5ea5a5f8
artemis_ad_packageorder_detail
:
#我的服务订单-已支付广告包
-
case
:
"
我的服务订单-已支付广告包"
package_order_id
:
"
685529883901"
assert
:
0
test_doctor_data/web2_data/artemis_add_value_order_id_detail.yaml
0 → 100644
View file @
5ea5a5f8
artemis_add_value_order_id_detail
:
#已购买case
-
case
:
"
已购买"
assert
:
"
已购买"
test_doctor_data/web_data/artemis_order_list.yaml
View file @
5ea5a5f8
artemis_order_list
:
#我的服务订单case
-
case
:
"
我的服务订单
请求失败
case"
case
:
"
我的服务订单
参数错误
case"
status
:
"
"
page
:
1
assert
:
0
assert_message
:
"
错误参数:
status"
-
case
:
"
我的服务订单-待支付广告包case"
status
:
0
...
...
test_doctor_data/web_data/conversation_coupon.yaml
View file @
5ea5a5f8
...
...
@@ -5,7 +5,7 @@ conversation_coupon:
doctor_user_id
:
"
602329"
assert
:
0
-
case
:
"
点击私信发送优惠券按钮
接口报错
"
case
:
"
点击私信发送优惠券按钮
缺少参数case
"
doctor_user_id
:
"
602329"
assert
:
0
assert_message
:
'
缺少参数:
doctor_user_id'
...
...
test_doctor_data/web_data/conversation_user_id.yaml
View file @
5ea5a5f8
...
...
@@ -10,7 +10,7 @@ conversation_user_id:
assert_message
:
"
消息发送成功"
assert_name
:
"
露露2"
-
case
:
"
发送失败
"
-
case
:
"
权限校验case:没有权限
"
type
:
0
content
:
您好
doctor_user_id
:
6023291
...
...
test_doctor_data/web_data/cpc_community_homepage.yaml
0 → 100644
View file @
5ea5a5f8
cpc_community_homepage
:
#点点通内容-概览case
-
case
:
"
点点通内容概览"
#doctor_user_id: "602329"
assert
:
False
assert_account
:
0
assert1
:
True
\ 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