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
248da587
Commit
248da587
authored
Jul 14, 2021
by
aha
Browse files
Options
Browse Files
Download
Plain Diff
merge common
parents
77ad34ef
4d51f523
Hide whitespace changes
Inline
Side-by-side
Showing
42 changed files
with
675 additions
and
123 deletions
+675
-123
answer_request.yaml
all_backend_api/answer_request.yaml
+0
-1
janus_request.py
all_backend_api/janus_request.py
+11
-0
janus_request.yaml
all_backend_api/janus_request.yaml
+12
-0
tractate_request.py
all_backend_api/tractate_request.py
+6
-2
tractate_request.yaml
all_backend_api/tractate_request.yaml
+21
-0
user_request.py
all_backend_api/user_request.py
+15
-3
user_request.yaml
all_backend_api/user_request.yaml
+24
-2
web_request.py
all_doctor_api/web_request.py
+16
-3
web_request.yaml
all_doctor_api/web_request.yaml
+20
-0
path_setting.py
path_setting.py
+16
-0
test_detail.py
test_backend_case/answer_case/test_detail.py
+22
-12
test_detail.py
test_backend_case/hospitals_case/test_detail.py
+6
-6
test_answer_answer_reply_vote.py
...backend_case/hybrid_case/test_answer_answer_reply_vote.py
+2
-5
test_question_new_answer_list.py
...backend_case/hybrid_case/test_question_new_answer_list.py
+3
-3
test_question_v1.py
test_backend_case/hybrid_case/test_question_v1.py
+2
-2
test_beauty_card_order_confirm.py
...backend_case/janus_case/test_beauty_card_order_confirm.py
+13
-1
test_beauty_card_order_submit.py
..._backend_case/janus_case/test_beauty_card_order_submit.py
+8
-1
test_polling.py
test_backend_case/janus_case/test_polling.py
+19
-0
test_product_mall_service_home_feed.py
...nd_case/janus_case/test_product_mall_service_home_feed.py
+2
-2
test_share_v4.py
test_backend_case/oneimage_case/test_share_v4.py
+12
-1
test_favor.py
test_backend_case/qa_case/test_favor.py
+2
-2
test_home_feed.py
test_backend_case/service_case/test_home_feed.py
+2
-2
test_create.py
test_backend_case/tractate_case/test_create.py
+33
-0
test_favor.py
test_backend_case/tractate_case/test_favor.py
+2
-2
test_publish_reply.py
test_backend_case/tractate_case/test_publish_reply.py
+2
-2
test_reply.py
test_backend_case/tractate_case/test_reply.py
+2
-2
test_vote.py
test_backend_case/tractate_case/test_vote.py
+56
-6
test_follow_add.py
test_backend_case/user_case/test_follow_add.py
+22
-0
test_follow_del.py
test_backend_case/user_case/test_follow_del.py
+17
-0
detail.yaml
test_backend_data/hospitals_data/detail.yaml
+54
-54
question_v1.yaml
test_backend_data/hybrid_data/question_v1.yaml
+0
-1
beauty_card_order_confirm.yaml
test_backend_data/janus_data/beauty_card_order_confirm.yaml
+19
-2
beauty_card_order_submit.yaml
test_backend_data/janus_data/beauty_card_order_submit.yaml
+24
-3
polling.yaml
test_backend_data/janus_data/polling.yaml
+9
-0
create.yaml
test_backend_data/tractate_data/create.yaml
+12
-0
vote.yaml
test_backend_data/tractate_data/vote.yaml
+103
-3
follow_add.yaml
test_backend_data/user_data/follow_add.yaml
+15
-0
follow_del.yaml
test_backend_data/user_data/follow_del.yaml
+7
-0
test_cpc_community_data_info.py
test_doctor_case/web_case/test_cpc_community_data_info.py
+27
-0
test_cpc_community_diaries.py
test_doctor_case/web_case/test_cpc_community_diaries.py
+22
-0
cpc_community_data_info.yaml
test_doctor_data/web_data/cpc_community_data_info.yaml
+8
-0
cpc_community_diaries.yaml
test_doctor_data/web_data/cpc_community_diaries.yaml
+7
-0
No files found.
all_backend_api/answer_request.yaml
View file @
248da587
...
...
@@ -4,7 +4,6 @@ detail:
url
:
/api/answer/detail
params
:
current_city_id
:
${current_city_id}
data
:
answer_id
:
${answer_id}
json
:
{}
# isLogin: 1 #需要登录添加这个字段,值为1 0是不需要登录的情况,如不需要登录,可以不添加这个字段
...
...
all_backend_api/janus_request.py
View file @
248da587
...
...
@@ -22,6 +22,9 @@ class janus_request(BaseRequest):
#次卡商详页
self
.
data
=
self
.
api_load
(
path_setting
.
BEAUTY_CARD_DETAIL_CONFIG
)
#直播polling循环
self
.
data
=
self
.
api_load
(
path_setting
.
POLLING_CONFIG
)
#搜索结果页-综合/百科tab
def
content_v7
(
self
,
query
,
device_id
,
current_city_id
,
version
,
is_first
,
tab_type
,
offset
):
#搜索词
...
...
@@ -230,6 +233,13 @@ class janus_request(BaseRequest):
return
self
.
api_send
(
self
.
data
[
"page_rules"
])
#直播poling循环
def
polling
(
self
,
stream_id
,
is_first
):
self
.
params
[
"stream_id"
]
=
stream_id
self
.
params
[
"is_first"
]
=
is_first
return
self
.
api_send
(
self
.
data
[
"polling"
])
if
__name__
==
'__main__'
:
...
...
@@ -303,6 +313,7 @@ if __name__ == '__main__':
# print(janus_request().beauty_card_refund_submit("102813852173916", 3, "个人身体原因", 0))
print
(
janus_request
()
.
beauty_card_order_detail
(
102247770691611
))
# print(janus_request().product_my_list(0, 0))
#直播-点击【设置封面】
print
(
"直播-点击【设置封面】"
)
print
(
janus_request
()
.
page_rules
(
"744.2"
,
"beijing"
,
"post_add_pic"
))
...
...
all_backend_api/janus_request.yaml
View file @
248da587
...
...
@@ -312,3 +312,15 @@ feed_service:
data
:
{}
json
:
{}
isLogin
:
0
#直播polling循环
polling
:
method
:
get
url
:
/api/janus/live/polling
params
:
stream_id
:
${stream_id}
is_first
:
${is_first}
data
:
{}
json
:
{}
all_backend_api/tractate_request.py
View file @
248da587
...
...
@@ -53,7 +53,6 @@ class tractate_request(BaseRequest):
self
.
params
[
"reply_id"
]
=
reply_id
return
self
.
api_send
(
self
.
data
[
"tractate_cancelvote"
])
# 帖子创建一级&二级评论
def
publish_reply
(
self
,
tractate_id
,
data_type
,
reply_id
,
content
):
self
.
params
[
"tractate_id"
]
=
tractate_id
...
...
@@ -62,5 +61,10 @@ class tractate_request(BaseRequest):
self
.
params
[
"content"
]
=
content
return
self
.
api_send
(
self
.
data
[
"publish_reply"
])
# 帖子创建--登录下
def
create
(
self
):
return
self
.
api_send
(
self
.
data
[
"create"
])
# 帖子创建--未登录下
def
create_unlogin
(
self
):
return
self
.
api_send
(
self
.
data
[
"create_unlogin"
])
all_backend_api/tractate_request.yaml
View file @
248da587
...
...
@@ -100,4 +100,24 @@ publish_reply:
content
:
${content}
json
:
{}
isLogin
:
1
#需要登录添加这个字段,值为1 0是不需要登录的情况,如不需要登录,可以不添加这个字段
#
#帖子创建一-未登录
create_unlogin
:
method
:
get
url
:
/api/tractate/create
params
:
data
:
json
:
{}
isLogin
:
0
#需要登录添加这个字段,值为1 0是不需要登录的情况,如不需要登录,可以不添加这个字段
#
#帖子创建一-登录
create
:
method
:
get
url
:
/api/tractate/create
params
:
data
:
json
:
{}
isLogin
:
1
#需要登录添加这个字段,值为1 0是不需要登录的情况,如不需要登录,可以不添加这个字段
#
\ No newline at end of file
all_backend_api/user_request.py
View file @
248da587
...
...
@@ -12,8 +12,6 @@ class user_request(BaseRequest):
return
self
.
api_send
(
self
.
data
[
"personal_center"
])
def
__init__
(
self
):
self
.
data
=
self
.
api_load
(
path_setting
.
USER_ANSWER_CONFIG
)
...
...
@@ -32,6 +30,20 @@ class user_request(BaseRequest):
def
topic_canclefavor
(
self
):
return
self
.
api_send
(
self
.
data
[
"canclefavor"
])
#关注主播
def
follow_add
(
self
,
uid
,
from_live
):
self
.
params
[
"uid"
]
=
uid
self
.
params
[
"from_live"
]
=
from_live
return
self
.
api_send
(
self
.
data
[
'follow_add'
])
#取消关注
def
follow_del
(
self
,
uid
,
from_live
):
self
.
params
[
"uid"
]
=
uid
self
.
params
[
"from_live"
]
=
from_live
return
self
.
api_send
(
self
.
data
[
"follow_del"
])
#我的-日记
def
my_diary_v2
(
self
,
start_num
,
count
):
...
...
@@ -62,7 +74,7 @@ if __name__ == '__main__':
# 日记贴收藏&取消收藏
# print(user_request().topic_favor())
# print(user_request().topic_canclefavor())
print
(
user_request
()
.
follow_del
(
"33909625"
,
"4196"
))
#我的-日记
print
(
user_request
()
.
my_diary_v2
(
0
,
10
))
...
...
all_backend_api/user_request.yaml
View file @
248da587
...
...
@@ -38,6 +38,28 @@ canclefavor:
json
:
{}
isLogin
:
1
#直播-关注主播
follow_add
:
method
:
post
url
:
/api/user/follow/add
params
:
{}
data
:
uid
:
${uid}
from_live
:
${from_live}
json
:
{}
isLogin
:
1
#直播-取消关注
follow_del
:
method
:
post
url
:
/api/user/follow/del
params
:
{}
data
:
uid
:
${uid}
from_live
:
${from_live}
json
:
{}
isLogin
:
1
# 我的-日记
my_diary_v2
:
method
:
GET
...
...
@@ -59,4 +81,5 @@ user_tractate:
count
:
${count}
data
:
{}
json
:
{}
isLogin
:
1
\ No newline at end of file
isLogin
:
1
all_doctor_api/web_request.py
View file @
248da587
...
...
@@ -75,6 +75,18 @@ class web_request(BaseRequest):
def
cpc_community_homepage
(
self
):
"点点通-内容-概览"
return
self
.
api_send
(
self
.
ACCOUNT_URL
[
"cpc_community_homepage"
])
def
cpc_community_diaries
(
self
):
"点点通-内容-数据统计-内容"
return
self
.
api_send
(
self
.
ACCOUNT_URL
[
"cpc_community_diaries"
])
def
cpc_community_data_info
(
self
,
diary_id
,
start_time
,
end_time
):
"点点通-内容-数据统计"
self
.
params
[
"diary_id"
]
=
diary_id
self
.
params
[
"start_time"
]
=
start_time
self
.
params
[
"end_time"
]
=
end_time
return
self
.
api_send
(
self
.
ACCOUNT_URL
[
"cpc_community_data_info"
])
...
...
@@ -95,9 +107,10 @@ if __name__ == '__main__':
print
(
web_request
()
.
conversation_user_id
(
0
,
"您好"
,
602329
,
"271caac2ae1687ca0a56ee18115b8183"
,
"NLeTxEx1BOQo1zjv2us9BQ00ViMAHGpJ"
))
print
(
web_request
()
.
cpc_homepage
())
print
(
web_request
()
.
artemis_ad_type_list
())
print
(
"发送"
)
print
(
web_request
()
.
artemis_order_list
(
0
,
1
))
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
print
(
web_request
()
.
cpc_community_homepage
())
print
(
web_request
()
.
cpc_community_diaries
())
print
(
web_request
()
.
cpc_community_data_info
(
"15604767"
,
"2021-07-02"
,
"2021-07-12"
))
\ No newline at end of file
all_doctor_api/web_request.yaml
View file @
248da587
...
...
@@ -161,4 +161,23 @@ cpc_community_homepage:
params
:
{}
data
:
{}
json
:
{}
isLogin
:
1
#需要登录
cpc_community_diaries
:
method
:
get
url
:
/api/web/cpc_community/diaries
params
:
{}
data
:
{}
json
:
{}
isLogin
:
1
#需要登录
cpc_community_data_info
:
method
:
get
url
:
/api/web/cpc_community/data/info
params
:
diary_id
:
${diary_id}
start_time
:
${start_time}
end_time
:
${end_time}
data
:
{}
json
:
{}
isLogin
:
1
#需要登录
\ No newline at end of file
path_setting.py
View file @
248da587
...
...
@@ -85,6 +85,8 @@ TRACTATE_FAVOR = os.path.join(BASE_DIR, "backend_auto/test_backend_data/tractate
TRACTATE_VOTE
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_backend_data/tractate_data"
,
"vote.yaml"
)
# 帖子详情页--一级评论创建
TRACTATE_PUBLISH_REPLY
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_backend_data/tractate_data"
,
"publish_reply.yaml"
)
#发帖子--帖子内容创建
TRACTATE_CREATE
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_backend_data/tractate_data"
,
"create.yaml"
)
# 问答详情页--问题详情
...
...
@@ -437,6 +439,11 @@ ADPACKAGEORDERDETAIL=os.path.join(BASE_DIR, "backend_auto/test_doctor_data/web2_
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"
)
#医生后台-点点通内容-数据统计-内容
CPCCOMMUNITYDIARIES
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_doctor_data/web_data"
,
"cpc_community_diaries.yaml"
)
#医生后台-点点通内容-数据统计
CPCCOMMUNITYDATAINFO
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_doctor_data/web_data"
,
"cpc_community_data_info.yaml"
)
#更美次卡橱窗组件商品
VISUAL_BEAUTY_CARD_SERVICES_CONFIG
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/all_backend_api"
,
"visual_beauty_card.yaml"
)
...
...
@@ -529,6 +536,15 @@ PAGE_RULES_CONFIG = os.path.join(BASE_DIR, "backend_auto/all_backend_api", "janu
PAGE_RULES
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_backend_data/janus_data"
,
"page_rules.yaml"
)
#直播polling循环
POLLING_CONFIG
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/all_backend_api"
,
"janus_request.yaml"
)
POLLING
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_backend_data/janus_data"
,
"polling.yaml"
)
#直播关注/取关主播
FOLLOW_ADD
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_backend_data/user_data"
,
"follow_add.yaml"
)
FOLLOW_DEL
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_backend_data/user_data"
,
"follow_del.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"
)
...
...
test_backend_case/answer_case/test_detail.py
View file @
248da587
...
...
@@ -3,20 +3,30 @@ import pytest
from
ids_list
import
get_ids
import
path_setting
from
in_common.base_request
import
BaseRequest
from
all_backend_api.a
ccount_request
import
account
_request
from
all_backend_api.a
nswer_request
import
answer
_request
class
TestLoginVfc
:
data
=
BaseRequest
()
.
api_load
(
path_setting
.
LOGIN_VFC
)
loginvfc_case
,
loginvfc_data
=
get_ids
(
data
,
"login_vfc"
)
class
TestDetail
:
data
=
BaseRequest
()
.
api_load
(
path_setting
.
DETAIL
)
detail_case
,
detail_data
=
get_ids
(
data
,
"detail"
)
@pytest.mark.parametrize
(
"param"
,
detail_data
,
ids
=
detail_case
)
def
test_detail
(
self
,
param
):
# print(param["vfc_code"])
r
=
answer_request
()
.
detail
(
param
[
"current_city_id"
],
param
[
"answer_id"
])
# if r["error"] == 0:
# assert r["data"]["account_phone"] == param["assert"]
# if r["error"] == 1:
# assert r["message"] == param["assert"]
assert
r
[
"data"
][
"is_favored"
]
is
not
None
and
r
[
"data"
][
"is_favored"
]
is
not
""
assert
r
[
"data"
][
"comment_num"
]
is
not
None
and
r
[
"data"
][
"comment_num"
]
is
not
""
assert
r
[
"data"
][
"time"
]
is
not
None
and
r
[
"data"
][
"time"
]
is
not
""
assert
r
[
"data"
][
"vote_num"
]
is
not
None
and
r
[
"data"
][
"vote_num"
]
is
not
""
assert
r
[
"data"
][
"is_following"
]
is
not
None
and
r
[
"data"
][
"is_following"
]
is
not
""
assert
r
[
"data"
][
"is_author"
]
is
not
None
and
r
[
"data"
][
"is_author"
]
is
not
""
assert
r
[
"data"
][
"is_voted"
]
is
not
None
and
r
[
"data"
][
"is_voted"
]
is
not
""
assert
r
[
"data"
][
"view_num"
]
is
not
None
and
r
[
"data"
][
"view_num"
]
is
not
""
assert
r
[
"data"
][
"answer_id"
]
is
not
None
and
r
[
"data"
][
"answer_id"
]
is
not
""
@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/hospitals_case/test_detail.py
View file @
248da587
...
...
@@ -15,12 +15,12 @@ class TestDetail:
r
=
hospitals_request
()
.
detail
()
assert
r
[
"error"
]
==
param
[
"assert_error"
]
assert
r
[
"data"
][
"base_info"
][
"hospital_name"
]
==
param
[
"assert"
]
assert
r
[
"data"
][
"base_info"
][
"good_at"
][
0
]
==
param
[
"assert1"
]
assert
r
[
"data"
][
"base_info"
][
"hospital_type"
]
==
param
[
"assert2"
]
assert
r
[
"data"
][
"buy_related"
][
"gifts"
][
0
][
"gift_id"
]
==
param
[
"assert3"
]
assert
r
[
"data"
][
"tab"
]
==
param
[
"assert4"
]
assert
r
[
"data"
][
"image_header_area"
][
"hospital_images"
][
0
]
==
param
[
"assert5"
]
#
assert r["data"]["base_info"]["hospital_name"] == param["assert"]
#
assert r["data"]["base_info"]["good_at"][0] == param["assert1"]
#
assert r["data"]["base_info"]["hospital_type"] == param["assert2"]
#
assert r["data"]["buy_related"]["gifts"][0]["gift_id"] == param["assert3"]
#
assert r["data"]["tab"] == param["assert4"]
#
assert r["data"]["image_header_area"]["hospital_images"][0] == param["assert5"]
...
...
test_backend_case/hybrid_case/test_answer_answer_reply_vote.py
View file @
248da587
...
...
@@ -8,14 +8,13 @@ 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"
)
answeranswerreplyvote_case
,
answeranswerreplyvote
_data
=
get_ids
(
data
,
"answer_reply_vote"
)
@pytest.mark.parametrize
(
"param"
,
test_data
,
ids
=
test
_case
)
@pytest.mark.parametrize
(
"param"
,
answeranswerreplyvote_data
,
ids
=
answeranswerreplyvote
_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"
]
...
...
@@ -23,14 +22,12 @@ class TestAnswerAnswerReplyVote:
# 取消点赞,回到取消点赞的状态
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_question_new_answer_list.py
View file @
248da587
...
...
@@ -7,11 +7,11 @@ from all_backend_api.hybrid_request import hybrid_request
class
TestQuestionNewAnswerLi
i
st
:
class
TestQuestionNewAnswerList
:
data
=
BaseRequest
()
.
api_load
(
path_setting
.
ANSWER_LIST
)
test_case
,
te
st_data
=
get_ids
(
data
,
"question_new_answer_list"
)
questionnewanswerlist_case
,
questionnewanswerli
st_data
=
get_ids
(
data
,
"question_new_answer_list"
)
@pytest.mark.parametrize
(
"param"
,
test_data
,
ids
=
te
st_case
)
@pytest.mark.parametrize
(
"param"
,
questionnewanswerlist_data
,
ids
=
questionnewanswerli
st_case
)
def
test_question_v1
(
self
,
param
):
r
=
hybrid_request
()
.
question_new_answer_list
(
param
[
"question_id"
])
if
r
[
"error"
]
==
0
:
...
...
test_backend_case/hybrid_case/test_question_v1.py
View file @
248da587
...
...
@@ -9,9 +9,9 @@ from all_backend_api.hybrid_request import hybrid_request
class
TestQuestionV1
:
data
=
BaseRequest
()
.
api_load
(
path_setting
.
QUESTION_DETAIL
)
test_case
,
test
_data
=
get_ids
(
data
,
"question_v1"
)
questionv1_case
,
questionv1
_data
=
get_ids
(
data
,
"question_v1"
)
@pytest.mark.parametrize
(
"param"
,
test_data
,
ids
=
test
_case
)
@pytest.mark.parametrize
(
"param"
,
questionv1_data
,
ids
=
questionv1
_case
)
def
test_question_v1
(
self
,
param
):
r
=
hybrid_request
()
.
question_v1
()
assert
r
[
"error"
]
==
param
[
"error"
]
...
...
test_backend_case/janus_case/test_beauty_card_order_confirm.py
View file @
248da587
...
...
@@ -14,6 +14,18 @@ class TestBeautyCardOrderConfirm:
def
test_beauty_card_order_confirm
(
self
,
param
):
r
=
janus_request
()
.
beauty_card_order_confirm
(
param
[
"sku_id"
],
param
[
"number"
],
param
[
"use_bc_coupon"
],
param
[
"bc_coupon_id"
])
if
r
[
"error"
]
==
0
:
if
param
[
"number"
]
==
1
:
#购买1个sku时
assert
r
[
"error"
]
==
param
[
"assert_error"
]
assert
r
[
"data"
][
"payment_total_price"
]
==
param
[
"assert_total_price"
]
assert
r
[
"data"
][
"payment_total_fee"
]
==
param
[
"assert_total_fee"
]
assert
r
[
"data"
][
"user_buy_lower_limit"
]
==
param
[
"assert_user_buy_lower_limit"
]
assert
r
[
"data"
][
"user_buy_upper_limit"
]
==
param
[
"assert_user_buy_upper_limit"
]
assert
r
[
"data"
][
"is_doctor_see"
]
==
param
[
"assert_is_doctor_see"
]
if
param
[
"number"
]
==
2
:
#购买2个sku时
assert
r
[
"error"
]
==
param
[
"assert_error"
]
assert
r
[
"data"
][
"payment_total_price"
]
==
param
[
"assert_total_price"
]
assert
r
[
"data"
][
"payment_total_fee"
]
==
param
[
"assert_total_fee"
]
assert
r
[
"data"
][
"user_buy_lower_limit"
]
==
param
[
"assert_user_buy_lower_limit"
]
assert
r
[
"data"
][
"user_buy_upper_limit"
]
==
param
[
"assert_user_buy_upper_limit"
]
test_backend_case/janus_case/test_beauty_card_order_submit.py
View file @
248da587
...
...
@@ -16,6 +16,13 @@ class TestBeautyCardOrderSubmit:
param
[
"is_doctor_see"
],
param
[
"gain_coupon_id"
],
param
[
"deduction_price"
])
if
r
[
"error"
]
==
0
:
if
param
[
"is_doctor_see"
]
==
1
and
param
[
"number"
]
==
1
:
assert
r
[
"error"
]
==
param
[
"assert_error"
]
assert
r
[
"data"
][
"status"
]
==
param
[
"assert_status"
]
if
param
[
"is_doctor_see"
]
==
0
and
param
[
"number"
]
==
1
:
assert
r
[
"error"
]
==
param
[
"assert_error"
]
assert
r
[
"data"
][
"status"
]
==
param
[
"assert_status"
]
if
param
[
"number"
]
==
2
:
assert
r
[
"error"
]
==
param
[
"assert_error"
]
assert
r
[
"data"
][
"status"
]
==
param
[
"assert_status"
]
test_backend_case/janus_case/test_polling.py
0 → 100644
View file @
248da587
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
TestPolling
:
data
=
BaseRequest
()
.
api_load
(
path_setting
.
POLLING
)
polling_case
,
polling_data
=
get_ids
(
data
,
"polling"
)
print
(
'polling_data:'
,
polling_data
)
@pytest.mark.parametrize
(
"param"
,
polling_data
,
ids
=
polling_case
)
def
test_polling
(
self
,
param
):
print
(
param
)
r
=
janus_request
()
.
polling
(
param
[
"stream_id"
],
param
[
"is_first"
])
print
(
r
)
if
r
[
"error"
]
==
0
:
assert
r
[
"data"
][
"delay"
]
==
param
[
"assert"
]
\ No newline at end of file
test_backend_case/janus_case/test_product_mall_service_home_feed.py
View file @
248da587
...
...
@@ -8,9 +8,9 @@ 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"
)
productmallservicehomefeed_case
,
productmallservicehomefeed
_data
=
get_ids
(
data
,
"feed_service"
)
@pytest.mark.parametrize
(
"param"
,
test_data
,
ids
=
test
_case
)
@pytest.mark.parametrize
(
"param"
,
productmallservicehomefeed_data
,
ids
=
productmallservicehomefeed
_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
...
...
test_backend_case/oneimage_case/test_share_v4.py
View file @
248da587
...
...
@@ -18,5 +18,16 @@ class TestShareV4:
def
test_share_v4
(
self
,
param
):
r
=
oneimage_request
()
.
share_v4
(
param
[
"version"
],
param
[
"face_id"
])
assert
r
[
"error"
]
==
0
face_name
=
r
[
"data"
][
"face_desc"
][
"face_name"
]
assert
face_name
is
not
None
classification_info
=
r
[
"data"
][
"classification_info"
]
# 测颜值结果,保证五官有值
for
key
,
value
in
classification_info
.
items
():
print
(
key
,
value
[
"name"
],
value
[
"param"
])
assert
value
[
"name"
]
is
not
None
assert
value
[
"param"
]
is
not
None
# 颜值报告
content
=
r
[
"data"
][
"tractate_info"
][
"content"
]
print
(
content
)
assert
content
is
not
None
test_backend_case/qa_case/test_favor.py
View file @
248da587
...
...
@@ -8,9 +8,9 @@ from all_backend_api.qa_request import qa_request
class
TestFavor
:
data
=
BaseRequest
()
.
api_load
(
path_setting
.
QA_FAVOR
)
test_case
,
test
_data
=
get_ids
(
data
,
"favor"
)
favor_case
,
favor
_data
=
get_ids
(
data
,
"favor"
)
@pytest.mark.parametrize
(
"param"
,
test_data
,
ids
=
test
_case
)
@pytest.mark.parametrize
(
"param"
,
favor_data
,
ids
=
favor
_case
)
def
test_favor
(
self
,
param
):
r
=
qa_request
()
.
favor
(
param
[
"answer_id"
])
assert
r
[
"error"
]
==
param
[
"error"
]
...
...
test_backend_case/service_case/test_home_feed.py
View file @
248da587
...
...
@@ -8,9 +8,9 @@ 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"
)
productmallservicehomefeed_case
,
productmallservicehomefeed
_data
=
get_ids
(
data
,
"home_feed"
)
@pytest.mark.parametrize
(
"param"
,
test_data
,
ids
=
test
_case
)
@pytest.mark.parametrize
(
"param"
,
productmallservicehomefeed_data
,
ids
=
productmallservicehomefeed
_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
...
...
test_backend_case/tractate_case/test_create.py
0 → 100644
View file @
248da587
import
json
import
pytest
from
ids_list
import
get_ids
import
path_setting
from
in_common.base_request
import
BaseRequest
from
all_backend_api.tractate_request
import
tractate_request
class
TestCreate
:
data
=
BaseRequest
()
.
api_load
(
path_setting
.
TRACTATE_CREATE
)
create_case
,
create_data
=
get_ids
(
data
,
"create"
)
@pytest.mark.parametrize
(
"param"
,
create_data
,
ids
=
create_case
)
def
test_create
(
self
,
param
):
# 登录了的-校验
r
=
tractate_request
()
.
create
()
assert
r
[
"error"
]
==
param
[
"error1"
]
# 未登录的-校验
s
=
tractate_request
()
.
create_unlogin
()
s
=
json
.
loads
(
s
)
# r = json.loads(r)
# print(type(r))
assert
s
[
"message"
]
==
param
[
"message1"
]
test_backend_case/tractate_case/test_favor.py
View file @
248da587
...
...
@@ -8,9 +8,9 @@ from all_backend_api.tractate_request import tractate_request
class
TestFavor
:
data
=
BaseRequest
()
.
api_load
(
path_setting
.
TRACTATE_FAVOR
)
test_case
,
test
_data
=
get_ids
(
data
,
"favor"
)
favor_case
,
favor
_data
=
get_ids
(
data
,
"favor"
)
@pytest.mark.parametrize
(
"param"
,
test_data
,
ids
=
test
_case
)
@pytest.mark.parametrize
(
"param"
,
favor_data
,
ids
=
favor
_case
)
def
test_favor
(
self
,
param
):
r
=
tractate_request
()
.
favor
(
param
[
"tractate_id"
],
param
[
"data_type"
])
# print(r)
...
...
test_backend_case/tractate_case/test_publish_reply.py
View file @
248da587
...
...
@@ -8,9 +8,9 @@ from all_backend_api.tractate_request import tractate_request
class
TestPublishReply
:
data
=
BaseRequest
()
.
api_load
(
path_setting
.
TRACTATE_PUBLISH_REPLY
)
test_case
,
test
_data
=
get_ids
(
data
,
"publish_reply"
)
publishreply_case
,
publishreply
_data
=
get_ids
(
data
,
"publish_reply"
)
@pytest.mark.parametrize
(
"param"
,
test_data
,
ids
=
test
_case
)
@pytest.mark.parametrize
(
"param"
,
publishreply_data
,
ids
=
publishreply
_case
)
def
test_publish_reply
(
self
,
param
):
r
=
tractate_request
()
.
publish_reply
(
param
[
"tractate_id"
],
param
[
"data_type"
],
param
[
"reply_id"
],
param
[
"content"
])
# print(r)
...
...
test_backend_case/tractate_case/test_reply.py
View file @
248da587
...
...
@@ -7,9 +7,9 @@ from all_backend_api.tractate_request import tractate_request
class
TestReply
:
data
=
BaseRequest
()
.
api_load
(
path_setting
.
TRACTATE_REPLY
)
test_case
,
test
_data
=
get_ids
(
data
,
"reply"
)
reply_case
,
reply
_data
=
get_ids
(
data
,
"reply"
)
@pytest.mark.parametrize
(
"param"
,
test_data
,
ids
=
test
_case
)
@pytest.mark.parametrize
(
"param"
,
reply_data
,
ids
=
reply
_case
)
def
test_reply
(
self
,
param
):
r
=
tractate_request
()
.
reply
(
param
[
"current_city_id"
],
param
[
"id"
],
param
[
"data_type"
]
)
# print(r)
...
...
test_backend_case/tractate_case/test_vote.py
View file @
248da587
...
...
@@ -9,9 +9,9 @@ from all_backend_api.tractate_request import tractate_request
class
TestVote
:
data
=
BaseRequest
()
.
api_load
(
path_setting
.
TRACTATE_VOTE
)
test_case
,
test
_data
=
get_ids
(
data
,
"tractate_vote"
)
vote_case
,
vote
_data
=
get_ids
(
data
,
"tractate_vote"
)
@pytest.mark.parametrize
(
"param"
,
test_data
,
ids
=
test
_case
)
@pytest.mark.parametrize
(
"param"
,
vote_data
,
ids
=
vote
_case
)
def
test_vote
(
self
,
param
):
r
=
tractate_request
()
.
tractate_detail
(
param
[
"current_city_id"
],
param
[
"tractate_id"
],
param
[
"data_type"
])
if
r
[
"error"
]
==
0
:
...
...
@@ -22,12 +22,62 @@ class TestVote:
assert
vote
[
"error"
]
==
0
assert
vote
[
"message"
]
==
param
[
"message1"
]
# 取消点赞,回到取消点赞的状态
canc
le
vote
=
tractate_request
()
.
tractate_cancelvote
(
param
[
"tractate_id"
],
param
[
"data_type"
],
param
[
"reply_id"
])
assert
canc
le
vote
[
"error"
]
==
0
canc
el
vote
=
tractate_request
()
.
tractate_cancelvote
(
param
[
"tractate_id"
],
param
[
"data_type"
],
param
[
"reply_id"
])
assert
canc
el
vote
[
"error"
]
==
0
else
:
# 如果是已经点过赞的状态就直接取消点赞
canclevote
=
tractate_request
()
.
tractate_cancelvote
(
param
[
"tractate_id"
],
param
[
"data_type"
],
param
[
"reply_id"
])
assert
canclevote
[
"message"
]
==
param
[
"message2"
]
cancelvote
=
tractate_request
()
.
tractate_cancelvote
(
param
[
"tractate_id"
],
param
[
"data_type"
],
param
[
"reply_id"
])
assert
cancelvote
[
"message"
]
==
param
[
"message2"
]
# r = tractate_request().tractate_detail(param["current_city_id"], param["tractate_id"], param["data_type"])
# if r["error"] == 0:
# assert r["error"] == param["assert1"]
# # 如果没有点过赞,就先校验点赞之后再取消点赞。【最后保持取消点赞的状态】
# if not r["data"]["tractate_list"]["is_voted"]:
# vote = tractate_request().tractate_vote(param["tractate_id"], param["data_type"], param["reply_id"])
# assert vote["error"] == 0
# assert vote["message"] == param["message"]
# print(param["position"])
# # # 取消点赞,回到取消点赞的状态
# # cancelvote = tractate_request().tractate_cancelvote(param["tractate_id"], param["data_type"], param["reply_id"])
# # assert cancelvote["error"] == 0
# elif param["position"] == 1:
# vote = tractate_request().tractate_vote(param["tractate_id"], param["data_type"], param["reply_id"])
# assert vote["error"] == 0
# assert vote["message"] == param["message"]
# print(param["position"])
# else:
# # 如果是已经点过赞的状态就直接取消点赞
# cancelvote = tractate_request().tractate_cancelvote(param["tractate_id"], param["data_type"], param["reply_id"])
# assert cancelvote["message"] == param["message"]
# print(param["position"])
...
...
test_backend_case/user_case/test_follow_add.py
0 → 100644
View file @
248da587
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
import
json
class
TestFollowAdd
:
data
=
BaseRequest
()
.
api_load
(
path_setting
.
FOLLOW_ADD
)
follow_add_case
,
follow_add_data
=
get_ids
(
data
,
"follow_add"
)
@pytest.mark.parametrize
(
"param"
,
follow_add_data
,
ids
=
follow_add_case
)
def
test_follow_add
(
self
,
param
):
r
=
user_request
()
.
follow_add
(
param
[
"uid"
],
param
[
"from_live"
])
# r=json.loads(r)
# print("---------",r,type(r))
if
r
[
"error"
]
==
0
:
assert
r
[
"error"
]
==
param
[
"assert"
]
if
r
[
"error"
]
==
1
:
assert
r
[
"message"
]
==
param
[
"assert1"
]
\ No newline at end of file
test_backend_case/user_case/test_follow_del.py
0 → 100644
View file @
248da587
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
TestFollowDel
:
data
=
BaseRequest
()
.
api_load
(
path_setting
.
FOLLOW_DEL
)
follow_del_case
,
follow_del_data
=
get_ids
(
data
,
"follow_del"
)
@pytest.mark.parametrize
(
"param"
,
follow_del_data
,
ids
=
follow_del_case
)
def
test_follow_del
(
self
,
param
):
r
=
user_request
()
.
follow_del
(
param
[
"uid"
],
param
[
"from_live"
])
if
r
[
"error"
]
==
0
:
assert
r
[
"error"
]
==
param
[
"assert"
]
\ No newline at end of file
test_backend_data/hospitals_data/detail.yaml
View file @
248da587
...
...
@@ -9,58 +9,58 @@ detail:
assert3
:
56895
assert4
:
{
index
:
true
,
service
:
true
,
doctor
:
true
,
publish
:
false
,
doctor_say
:
false
,
diary
:
true
,
answer
:
false
}
assert5
:
"
https://heras.igengmei.com/doctor/2020/07/29/ef19b5fa94-w"
-
case
:
"
校验医院名称case"
assert_error
:
0
assert
:
"
北京嘉禾医疗美容"
assert1
:
"
私密修复"
assert2
:
"
民营"
assert3
:
56895
assert4
:
{
index
:
true
,
service
:
true
,
doctor
:
true
,
publish
:
false
,
doctor_say
:
false
,
diary
:
true
,
answer
:
false
}
assert5
:
"
https://heras.igengmei.com/doctor/2020/07/29/ef19b5fa94-w"
-
case
:
"
校验明星项目case"
assert_error
:
0
assert
:
"
北京嘉禾医疗美容"
assert1
:
"
私密修复"
assert2
:
"
民营"
assert3
:
56895
assert4
:
{
index
:
true
,
service
:
true
,
doctor
:
true
,
publish
:
false
,
doctor_say
:
false
,
diary
:
true
,
answer
:
false
}
assert5
:
"
https://heras.igengmei.com/doctor/2020/07/29/ef19b5fa94-w"
-
case
:
"
校验医院类型case"
assert_error
:
0
assert
:
"
北京嘉禾医疗美容"
assert1
:
"
私密修复"
assert2
:
"
民营"
assert3
:
56895
assert4
:
{
index
:
true
,
service
:
true
,
doctor
:
true
,
publish
:
false
,
doctor_say
:
false
,
diary
:
true
,
answer
:
false
}
assert5
:
"
https://heras.igengmei.com/doctor/2020/07/29/ef19b5fa94-w"
-
case
:
"
校验优惠券返回case"
assert_error
:
0
assert
:
"
北京嘉禾医疗美容"
assert1
:
"
私密修复"
assert2
:
"
民营"
assert3
:
56895
assert4
:
{
index
:
true
,
service
:
true
,
doctor
:
true
,
publish
:
false
,
doctor_say
:
false
,
diary
:
true
,
answer
:
false
}
assert5
:
"
https://heras.igengmei.com/doctor/2020/07/29/ef19b5fa94-w"
-
case
:
"
校验tab返回case"
assert_error
:
0
assert
:
"
北京嘉禾医疗美容"
assert1
:
"
私密修复"
assert2
:
"
民营"
assert3
:
56895
assert4
:
{
index
:
true
,
service
:
true
,
doctor
:
true
,
publish
:
false
,
doctor_say
:
false
,
diary
:
true
,
answer
:
false
}
assert5
:
"
https://heras.igengmei.com/doctor/2020/07/29/ef19b5fa94-w"
-
case
:
"
校验医院图片case"
assert_error
:
0
assert
:
"
北京嘉禾医疗美容"
assert1
:
"
私密修复"
assert2
:
"
民营"
assert3
:
56895
assert4
:
{
index
:
true
,
service
:
true
,
doctor
:
true
,
publish
:
false
,
doctor_say
:
false
,
diary
:
true
,
answer
:
false
}
assert5
:
"
https://heras.igengmei.com/doctor/2020/07/29/ef19b5fa94-w"
#
-
#
case: "校验医院名称case"
#
assert_error: 0
#
assert: "北京嘉禾医疗美容"
#
assert1: "私密修复"
#
assert2: "民营"
#
assert3: 56895
#
assert4: {index: true, service: true, doctor: true, publish: false, doctor_say: false, diary: true, answer: false}
#
assert5: "https://heras.igengmei.com/doctor/2020/07/29/ef19b5fa94-w"
#
-
#
case: "校验明星项目case"
#
assert_error: 0
#
assert: "北京嘉禾医疗美容"
#
assert1: "私密修复"
#
assert2: "民营"
#
assert3: 56895
#
assert4: {index: true, service: true, doctor: true, publish: false, doctor_say: false, diary: true, answer: false}
#
assert5: "https://heras.igengmei.com/doctor/2020/07/29/ef19b5fa94-w"
#
-
#
case: "校验医院类型case"
#
assert_error: 0
#
assert: "北京嘉禾医疗美容"
#
assert1: "私密修复"
#
assert2: "民营"
#
assert3: 56895
#
assert4: {index: true, service: true, doctor: true, publish: false, doctor_say: false, diary: true, answer: false}
#
assert5: "https://heras.igengmei.com/doctor/2020/07/29/ef19b5fa94-w"
#
-
#
case: "校验优惠券返回case"
#
assert_error: 0
#
assert: "北京嘉禾医疗美容"
#
assert1: "私密修复"
#
assert2: "民营"
#
assert3: 56895
#
assert4: {index: true, service: true, doctor: true, publish: false, doctor_say: false, diary: true, answer: false}
#
assert5: "https://heras.igengmei.com/doctor/2020/07/29/ef19b5fa94-w"
#
-
#
case: "校验tab返回case"
#
assert_error: 0
#
assert: "北京嘉禾医疗美容"
#
assert1: "私密修复"
#
assert2: "民营"
#
assert3: 56895
#
assert4: {index: true, service: true, doctor: true, publish: false, doctor_say: false, diary: true, answer: false}
#
assert5: "https://heras.igengmei.com/doctor/2020/07/29/ef19b5fa94-w"
#
-
#
case: "校验医院图片case"
#
assert_error: 0
#
assert: "北京嘉禾医疗美容"
#
assert1: "私密修复"
#
assert2: "民营"
#
assert3: 56895
#
assert4: {index: true, service: true, doctor: true, publish: false, doctor_say: false, diary: true, answer: false}
#
assert5: "https://heras.igengmei.com/doctor/2020/07/29/ef19b5fa94-w"
test_backend_data/hybrid_data/question_v1.yaml
View file @
248da587
...
...
@@ -3,6 +3,5 @@ question_v1:
-
case
:
"
问题详情"
error
:
0
assert
:
false
assert2
:
true
test_backend_data/janus_data/beauty_card_order_confirm.yaml
View file @
248da587
beauty_card_order_confirm
:
-
case
:
"
次卡-确认订单-
接口调用成功case
"
case
:
"
次卡-确认订单-
sku数量为1
"
sku_id
:
"
10176"
number
:
1
use_bc_coupon
:
1
bc_coupon_id
:
0
assert_error
:
0
assert_error
:
0
#校验接口调用成功case
assert_total_price
:
"
2.00"
#校验订单总金额case
assert_total_fee
:
"
2.00"
#校验实付金额case
assert_user_buy_lower_limit
:
1
#校验最少购买数case
assert_user_buy_upper_limit
:
3
#校验最多购买数case
assert_is_doctor_see
:
true
#校验是否同意商家电话咨询case
-
case
:
"
次卡-确认订单-sku数量为2"
sku_id
:
"
10176"
number
:
2
use_bc_coupon
:
1
bc_coupon_id
:
0
assert_error
:
0
#校验接口调用成功case
assert_total_price
:
"
4.00"
#校验订单总金额case
assert_total_fee
:
"
4.00"
#校验实付金额case
assert_user_buy_lower_limit
:
1
#校验最少购买数case
assert_user_buy_upper_limit
:
3
#校验最多购买数case
test_backend_data/janus_data/beauty_card_order_submit.yaml
View file @
248da587
beauty_card_order_submit
:
-
case
:
"
次卡-提交订单-
校验接口返回成功case
"
case
:
"
次卡-提交订单-
同意商家咨询
"
phone
:
"
12345678912"
sku_id
:
"
10176"
number
:
1
is_doctor_see
:
1
gain_coupon_id
:
0
deduction_price
:
0
assert_error
:
0
\ No newline at end of file
assert_error
:
0
assert_status
:
1
-
case
:
"
次卡-提交订单-不同意商家咨询"
phone
:
"
12345678912"
sku_id
:
"
10176"
number
:
1
is_doctor_see
:
0
gain_coupon_id
:
0
deduction_price
:
0
assert_error
:
0
assert_status
:
1
-
case
:
"
次卡-提交订单-购买数量为2"
phone
:
"
12345678912"
sku_id
:
"
10176"
number
:
2
is_doctor_see
:
1
gain_coupon_id
:
0
deduction_price
:
0
assert_error
:
0
assert_status
:
1
\ No newline at end of file
test_backend_data/janus_data/polling.yaml
0 → 100644
View file @
248da587
#polling_vfc:
polling
:
#循环成功
-
case
:
"
polling循环成功"
stream_id
:
"
2334"
is_first
:
"
0"
assert
:
10
\ No newline at end of file
test_backend_data/tractate_data/create.yaml
0 → 100644
View file @
248da587
create
:
#发帖子--创建帖子页面接口校验
-
case
:
"
发帖子--创建帖子页面接口校验-"
current_city_id
:
"
beijiing"
error1
:
0
message1
:
"
请登录后再试"
test_backend_data/tractate_data/vote.yaml
View file @
248da587
tractate_vote
:
#贴子详情页点赞
#贴子详情页点赞----简单粗暴直接全部用写死的数据【不同帖子代表不同类型--并且把取消点赞接口迁移出去--指定输入-指定输出】
#position代表要用的是什么类型的case---不是必须有但有了比较好区分--从0开始【已废弃这个想法】
#技术水准有限拆不开,就写个点赞-二次点赞--取消点赞的闭环了;
-
case
:
"
贴子详情页--点赞
&取消点赞--用接口
校验"
case
:
"
贴子详情页--点赞
--二次点赞---取消点赞--
校验"
tractate_id
:
175152
reply_id
:
"
"
data_type
:
"
user_post"
...
...
@@ -12,7 +15,7 @@ tractate_vote:
-
case
:
"
贴子详情页--一级评论点赞
&取消点赞--用接口
校验"
case
:
"
贴子详情页--一级评论点赞
--二次点赞--取消点赞--
校验"
tractate_id
:
175152
reply_id
:
"
2167124"
data_type
:
"
user_post"
...
...
@@ -22,3 +25,100 @@ tractate_vote:
message2
:
"
取消点赞成功"
# -
# case: "贴子详情页--点赞&取消点赞--用接口校验 --测试单纯点赞"
# tractate_id: 175152
# reply_id: ""
# data_type: "user_post"
# current_city_id: "beijing"
# assert1: 0
# message: "点赞成功"
# position: 0
# -
# case: "贴子详情页--点赞&取消点赞--用接口校验--二次点赞校验"
# tractate_id: 175152
# reply_id: ""
# data_type: "user_post"
# current_city_id: "beijing"
# assert1: 0
# message: "点赞成功"
# position: 1
# -
# case: "贴子详情页--点赞&取消点赞--用接口校验---取消点赞"
# tractate_id: 175152
# reply_id: ""
# data_type: "user_post"
# current_city_id: "beijing"
# assert1: 0
# message: "取消点赞成功"
# position: 2
##
# -
# case: "贴子详情页--一级评论点赞--用接口校验"
# tractate_id: 175152
# reply_id: "2167124"
# data_type: "user_post"
# current_city_id: "beijing"
# assert1: 0
# message: "点赞成功"
# position: 0
#
# -
# case: "贴子详情页--一级评论点赞--用接口校验"
# tractate_id: 175152
# reply_id: "2167124"
# data_type: "user_post"
# current_city_id: "beijing"
# assert1: 0
# message: "点赞成功"
# position: 1
#
#
# -
# case: "贴子详情页--一级评论取消点赞--用接口校验"
# tractate_id: 175152
# reply_id: "2167124"
# data_type: "user_post"
# current_city_id: "beijing"
# assert1: 0
# message: "取消点赞成功"
# position: 2
#
#
#
# case: "贴子详情页--一级评论点赞&取消点赞--用接口校验"
# tractate_id: 175152
# reply_id: "2167124"
# data_type: "user_post"
# current_city_id: "beijing"
# assert1: 0
# message1: "点赞成功"
# message2: "取消点赞成功"
#
test_backend_data/user_data/follow_add.yaml
0 → 100644
View file @
248da587
follow_add
:
#关注
-
case
:
"
关注主播"
uid
:
33909625
from_live
:
4196
assert
:
0
assert1
:
请登录后再试
#未登录
# -
# case: "未登录"
# uid: 33909625
# from_live: 4196
#assert1: 请登录后再试
test_backend_data/user_data/follow_del.yaml
0 → 100644
View file @
248da587
follow_del
:
#取消关注
-
case
:
"
取消关注"
uid
:
33909625
from_live
:
4196
assert
:
0
test_doctor_case/web_case/test_cpc_community_data_info.py
0 → 100644
View file @
248da587
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
TestCpcCommunityDataInfo
:
data
=
BaseRequest
()
.
api_load
(
path_setting
.
CPCCOMMUNITYDATAINFO
)
cpccommunitydatainfo_case
,
cpccommunitydatainfo_data
=
get_ids
(
data
,
"cpc_community_data_info"
)
@pytest.mark.parametrize
(
"param"
,
cpccommunitydatainfo_data
,
ids
=
cpccommunitydatainfo_case
)
def
test_cpc_community_data_info
(
self
,
param
):
'''点点通内容-数据统计'''
r
=
web_request
()
.
cpc_community_data_info
(
param
[
"diary_id"
],
param
[
"start_time"
],
param
[
"end_time"
])
if
r
[
"error"
]
==
0
:
click_list
=
r
.
get
(
"data"
)
.
get
(
"click_list"
,
[])
paid_list
=
r
.
get
(
"data"
)
.
get
(
"paid_list"
,
[])
time_list
=
r
.
get
(
"data"
)
.
get
(
"time_list"
,
[])
assert
len
(
click_list
)
<=
param
[
"assert"
]
assert
len
(
paid_list
)
<=
param
[
"assert"
]
assert
len
(
time_list
)
<=
param
[
"assert"
]
test_doctor_case/web_case/test_cpc_community_diaries.py
0 → 100644
View file @
248da587
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
TestCpcCommunityDiaries
:
data
=
BaseRequest
()
.
api_load
(
path_setting
.
CPCCOMMUNITYDIARIES
)
cpccommunitydiaries_case
,
cpccommunitydiaries_data
=
get_ids
(
data
,
"cpc_community_diaries"
)
@pytest.mark.parametrize
(
"param"
,
cpccommunitydiaries_data
,
ids
=
cpccommunitydiaries_case
)
def
test_cpc_community_diaries
(
self
,
param
):
'''点点通-概览'''
r
=
web_request
()
.
cpc_community_diaries
()
if
r
[
"error"
]
==
0
:
diaries
=
r
.
get
(
"data"
)
.
get
(
"diaries"
,
[])
assert
len
(
diaries
)
>=
param
[
"assert"
]
test_doctor_data/web_data/cpc_community_data_info.yaml
0 → 100644
View file @
248da587
cpc_community_data_info
:
#点点通内容-数据统计case
-
case
:
"
点点通内容-数据统计"
diary_id
:
15604767
start_time
:
"
2021-07-02"
end_time
:
"
2021-07-12"
assert
:
13
test_doctor_data/web_data/cpc_community_diaries.yaml
0 → 100644
View file @
248da587
cpc_community_diaries
:
#点点通内容-数据统计-内容case
-
case
:
"
点点通内容-数据统计-内容"
#doctor_user_id: "602329"
assert
:
0
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment