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
edf059f6
Commit
edf059f6
authored
Jul 23, 2021
by
张慧
Browse files
Options
Browse Files
Download
Plain Diff
修复冲突
parents
588e153f
615aa36d
Hide whitespace changes
Inline
Side-by-side
Showing
56 changed files
with
840 additions
and
86 deletions
+840
-86
auto_complete_request.py
all_backend_api/auto_complete_request.py
+18
-0
auto_complete_request.yaml
all_backend_api/auto_complete_request.yaml
+18
-0
diary_request.py
all_backend_api/diary_request.py
+1
-1
janus_live_request.py
all_backend_api/janus_live_request.py
+13
-2
janus_live_request.yaml
all_backend_api/janus_live_request.yaml
+14
-0
janus_request.py
all_backend_api/janus_request.py
+56
-0
janus_request.yaml
all_backend_api/janus_request.yaml
+25
-0
live_request.py
all_backend_api/live_request.py
+25
-3
live_request.yaml
all_backend_api/live_request.yaml
+33
-2
order_request.py
all_backend_api/order_request.py
+13
-0
order_request.yaml
all_backend_api/order_request.yaml
+9
-0
tag_request.py
all_backend_api/tag_request.py
+21
-0
tag_request.yaml
all_backend_api/tag_request.yaml
+20
-0
topic_request.py
all_backend_api/topic_request.py
+6
-1
topic_request.yaml
all_backend_api/topic_request.yaml
+13
-29
path_setting.py
path_setting.py
+50
-6
__init__.py
test_backend_case/auto_complete_case/__init__.py
+0
-0
test_doctpr.py
test_backend_case/auto_complete_case/test_doctpr.py
+20
-0
test_hospital.py
test_backend_case/auto_complete_case/test_hospital.py
+20
-0
test_service.py
test_backend_case/diary_case/test_service.py
+14
-25
test_simulate_analyze.py
test_backend_case/gmai_case/test_simulate_analyze.py
+3
-0
test_beauty.py
test_backend_case/janus_case/test_beauty.py
+15
-0
test_beauty_post.py
test_backend_case/janus_case/test_beauty_post.py
+14
-0
test_mark_live_service.py
test_backend_case/janus_live_case/test_mark_live_service.py
+19
-0
test_finish.py
test_backend_case/live_case/test_finish.py
+18
-0
test_get_live_info_audience.py
test_backend_case/live_case/test_get_live_info_audience.py
+21
-0
test_sendmsg.py
test_backend_case/live_case/test_sendmsg.py
+22
-0
__init__.py
test_backend_case/order_case/__init__.py
+0
-0
test_is_exist.py
test_backend_case/order_case/test_is_exist.py
+19
-0
test_orders_my_v2_used.py
test_backend_case/orders_case/test_orders_my_v2_used.py
+43
-0
test_orders_my_v2_waituse.py
test_backend_case/orders_case/test_orders_my_v2_waituse.py
+21
-3
__init__.py
test_backend_case/tag_case/__init__.py
+0
-0
test_list.py
test_backend_case/tag_case/test_list.py
+19
-0
test_tag_add.py
test_backend_case/tag_case/test_tag_add.py
+15
-0
test_to_hospital_list.py
test_backend_case/topic_case/test_to_hospital_list.py
+19
-0
test_to_service_list.py
test_backend_case/topic_case/test_to_service_list.py
+21
-0
__init__.py
test_backend_data/auto_complete_data/__init__.py
+0
-0
doctor.yaml
test_backend_data/auto_complete_data/doctor.yaml
+8
-0
hospital.yaml
test_backend_data/auto_complete_data/hospital.yaml
+8
-0
diary_service.yaml
test_backend_data/diary_data/diary_service.yaml
+18
-9
simulate_analyze.yaml
test_backend_data/gmai_data/simulate_analyze.yaml
+17
-2
beauty.yaml
test_backend_data/janus_data/beauty.yaml
+6
-0
beauty_post.yaml
test_backend_data/janus_data/beauty_post.yaml
+18
-0
mark_live_service.yaml
test_backend_data/janus_live_data/mark_live_service.yaml
+20
-0
finish.yaml
test_backend_data/live_data/finish.yaml
+8
-0
get_live_info_audience.yaml
test_backend_data/live_data/get_live_info_audience.yaml
+9
-0
sendmsg.yaml
test_backend_data/live_data/sendmsg.yaml
+15
-0
__init__.py
test_backend_data/order_data/__init__.py
+0
-0
is_exist.yaml
test_backend_data/order_data/is_exist.yaml
+9
-0
my_v2.yaml
test_backend_data/orders_data/my_v2.yaml
+12
-2
__init__.py
test_backend_data/tag_data/__init__.py
+0
-0
list.yaml
test_backend_data/tag_data/list.yaml
+11
-0
tag_add.yaml
test_backend_data/tag_data/tag_add.yaml
+6
-0
to_hospital_list.yaml
test_backend_data/topic_data/to_hospital_list.yaml
+8
-0
to_service_list.yaml
test_backend_data/topic_data/to_service_list.yaml
+8
-0
topic_reply_create.yaml
test_backend_data/topic_data/topic_reply_create.yaml
+1
-1
No files found.
all_backend_api/auto_complete_request.py
0 → 100644
View file @
edf059f6
import
path_setting
from
in_common.base_request
import
BaseRequest
class
auto_complete_request
(
BaseRequest
):
def
__init__
(
self
):
self
.
data
=
self
.
api_load
(
path_setting
.
AUTO_COMPLE_CONFIG
)
# 日记本添加医院
def
hospital
(
self
,
q
=
"1"
):
self
.
params
[
"q"
]
=
q
return
self
.
api_send
(
self
.
data
[
"hospital"
])
# 日记本添加医生
def
doctor
(
self
,
q
=
"1"
):
self
.
params
[
"q"
]
=
q
return
self
.
api_send
(
self
.
data
[
"doctor"
])
all_backend_api/auto_complete_request.yaml
0 → 100644
View file @
edf059f6
#日记本详情页--添加医院[目前默认传参为1]
hospital
:
method
:
get
url
:
/api/auto_complete/hospital/
params
:
q
:
${q}
json
:
{}
isLogin
:
1
#需要登录添加这个字段,值为1 0是不需要登录的情况,如不需要登录,可以不添加这个字段
#日记本详情页--添加医生[目前默认传参为1]
doctor
:
method
:
get
url
:
/api/auto_complete/doctor/
params
:
q
:
${q}
json
:
{}
isLogin
:
1
#需要登录添加这个字段,值为1 0是不需要登录的情况,如不需要登录,可以不添加这个字段
all_backend_api/diary_request.py
View file @
edf059f6
...
...
@@ -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/janus_live_request.py
View file @
edf059f6
...
...
@@ -11,6 +11,7 @@ class live_request(BaseRequest):
self
.
data
=
self
.
api_load
(
path_setting
.
DELETELIVESERVICE_CONFIG
)
self
.
data
=
self
.
api_load
(
path_setting
.
DELETEGIFT_CONFIG
)
self
.
data
=
self
.
api_load
(
path_setting
.
M_GET_CHANNEL_STATUS_CONFIG
)
self
.
data
=
self
.
api_load
(
path_setting
.
MARK_LIVE_SERVICE_CONFIG
)
#主播-推荐袋美购列表展示
def
live_services
(
self
,
channel_id
,
stream_id
,
offset
,
size
):
...
...
@@ -80,9 +81,19 @@ class live_request(BaseRequest):
self
.
params
[
"version"
]
=
version
return
self
.
api_send
(
self
.
data
[
"m_get_channel_status"
])
#主播标记讲解商品+取消标记
def
mark_live_service
(
self
,
stream_id
,
channel_id
,
live_service_id
,
mark_status
,
version
,
device_id
=
'97B6764B-2135-4761-9911-701C38CBC272'
):
self
.
params
[
"stream_id"
]
=
stream_id
self
.
params
[
"channel_id"
]
=
channel_id
self
.
params
[
"live_service_id"
]
=
live_service_id
self
.
params
[
"mark_status"
]
=
mark_status
self
.
params
[
"version"
]
=
version
return
self
.
api_send
(
self
.
data
[
"mark_live_service"
])
if
__name__
==
'__main__'
:
# print(live_request().live_services("745", "4177", "0", "10"))
# print(live_request().search_service("beijing", "745", "", "0", "20", "7.45.0"))
# print(live_request().add_live_service("745", "560641", "7.45.0"))
# print(live_request().delete_live_service("745", "7242", "7.45.0"))
print
(
live_request
()
.
m_get_channel_status
(
"745"
,
"7.46.0"
))
\ No newline at end of file
#print(live_request().m_get_channel_status("745", "7.46.0"))
print
(
live_request
()
.
mark_live_service
(
"4233"
,
"745"
,
"7269"
,
"1"
,
"746.0"
))
\ No newline at end of file
all_backend_api/janus_live_request.yaml
View file @
edf059f6
...
...
@@ -89,4 +89,18 @@ m_get_channel_status:
json
:
{}
isLogin
:
1
#主播标记讲解商品+取消标记
mark_live_service
:
method
:
POST
url
:
/api/janus/live/mark_live_service
params
:
version
:
${version}
data
:
stream_id
:
${stream_id}
channel_id
:
${channel_id}
live_service_id
:
${live_service_id}
mark_status
:
${mark_status}
json
:
{}
isLogin
:
1
all_backend_api/janus_request.py
View file @
edf059f6
...
...
@@ -22,6 +22,12 @@ class janus_request(BaseRequest):
#直播polling循环
self
.
data
=
self
.
api_load
(
path_setting
.
POLLING_CONFIG
)
#直播获取美颜
#self.data = self.api_load(path_setting.BEAUTY_CONFIG)
#搜索结果页-综合/百科tab
def
content_v7
(
self
,
query
,
device_id
,
current_city_id
,
version
,
is_first
,
tab_type
,
offset
):
#搜索词
...
...
@@ -229,6 +235,19 @@ class janus_request(BaseRequest):
return
self
.
api_send
(
self
.
data
[
"polling"
])
#直播-主播获取美颜效果
def
beauty
(
self
,
channel_id
):
self
.
params
[
"channel_id"
]
=
channel_id
return
self
.
api_send
(
self
.
data
[
"beauty"
])
#直播-主播修改美颜效果
def
beauty_post
(
self
,
channel_id
,
is_open
,
smooth
,
white
,
rosy
):
self
.
params
[
"channel_id"
]
=
channel_id
self
.
params
[
"is_open"
]
=
is_open
self
.
params
[
"smooth"
]
=
smooth
self
.
params
[
"white"
]
=
white
self
.
params
[
"rosy"
]
=
rosy
return
self
.
api_send
(
self
.
data
[
"beauty_post"
])
if
__name__
==
'__main__'
:
...
...
@@ -261,6 +280,34 @@ if __name__ == '__main__':
# 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().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_service_hospital
(
"10046"
,
20
,
0
,
1
))
# #打印购物车-猜你喜欢列表接口返回
...
...
@@ -306,4 +353,13 @@ if __name__ == '__main__':
# #直播-点击【设置封面】
# print("直播-点击【设置封面】")
# print(janus_request().page_rules("744.2", "beijing", "post_add_pic"))
#直播-点击【设置封面】
print
(
"直播-点击【设置封面】"
)
print
(
janus_request
()
.
page_rules
(
"744.2"
,
"beijing"
,
"post_add_pic"
))
#直播-主播获取美颜
print
(
"meiyan"
)
print
(
janus_request
()
.
beauty
(
"739"
))
#直播-主播修改美颜
print
(
"change meiyan"
)
print
(
janus_request
()
.
beauty_post
(
"739"
,
"true"
,
"0.60"
,
"0.40"
,
"0.70"
))
all_backend_api/janus_request.yaml
View file @
edf059f6
...
...
@@ -317,3 +317,27 @@ polling:
data
:
{}
json
:
{}
#直播-主播获取美颜
beauty
:
method
:
get
url
:
/api/janus/live/beauty
params
:
channel_id
:
${channel_id}
data
:
{}
json
:
{}
isLogin
:
1
#直播-主播修改美颜
beauty_post
:
method
:
post
url
:
/api/janus/live/beauty
params
:
{}
data
:
channel_id
:
${channel_id}
is_open
:
${is_open}
smooth
:
${smooth}
white
:
${white}
rosy
:
${rosy}
json
:
{}
isLogin
:
1
\ No newline at end of file
all_backend_api/live_request.py
View file @
edf059f6
...
...
@@ -11,7 +11,7 @@ class living_request(BaseRequest):
self
.
params
[
"msg_id"
]
=
msg_id
self
.
params
[
"user_id"
]
=
user_id
return
self
.
api_send
(
self
.
data
[
"danmu_v2"
])
#主播开播
#主播开播
git
def
pushlive_info
(
self
,
title
,
cover_url
,
notice
,
tag_id
,
clarity
,
device_type
):
self
.
params
[
"title"
]
=
title
self
.
params
[
"cover_url"
]
=
cover_url
...
...
@@ -20,6 +20,12 @@ class living_request(BaseRequest):
self
.
params
[
"clarity"
]
=
clarity
self
.
params
[
"device_type"
]
=
device_type
return
self
.
api_send
(
self
.
data
[
"pushlive_info"
])
#用户-发送弹幕
def
sendmsg
(
self
,
channel_id
,
msg
):
self
.
params
[
"channel_id"
]
=
channel_id
self
.
params
[
"msg"
]
=
msg
return
self
.
api_send
(
self
.
data
[
'sendmsg'
])
#观众进入直播间
def
enter
(
self
,
channel_id
,
from_source
,
version
,
device_id
=
"97B6764B-2135-4761-9911-701C38CBC272"
):
...
...
@@ -34,8 +40,24 @@ class living_request(BaseRequest):
self
.
params
[
"version"
]
=
version
return
self
.
api_send
(
self
.
data
[
"leave"
])
#直播结束-主播下播
def
finish
(
self
,
channel_id
,
version
,
device_id
=
"97B6764B-2135-4761-9911-701C38CBC272"
):
self
.
params
[
"channel_id"
]
=
channel_id
self
.
params
[
"version"
]
=
version
return
self
.
api_send
(
self
.
data
[
"finish"
])
#主播-分享按钮的点击
def
get_live_info_audience
(
self
,
channel_id
,
version
,
device_id
=
"97B6764B-2135-4761-9911-701C38CBC272"
):
self
.
params
[
"channel_id"
]
=
channel_id
self
.
params
[
"version"
]
=
version
return
self
.
api_send
(
self
.
data
[
"get_live_info_audience"
])
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
(
living_request
()
.
pushlive_info
(
"小冤家"
,
"2021/04/22/1003/cef471cff5e6"
,
""
,
"1"
,
"1"
,
"1"
))
print
(
living_request
()
.
sendmsg
(
"739"
,
"你好"
))
print
(
living_request
()
.
finish
(
"745"
,
"746.0"
))
print
(
living_request
()
.
get_live_info_audience
(
"745"
,
"7.46.0"
))
\ No newline at end of file
all_backend_api/live_request.yaml
View file @
edf059f6
...
...
@@ -26,7 +26,7 @@ pushlive_info:
#观众进入直播间
enter
:
method
:
get
method
:
GET
url
:
/api/live/enter
params
:
channel_id
:
${channel_id}
...
...
@@ -38,7 +38,7 @@ enter:
#观众离开直播间
leave
:
method
:
get
method
:
GET
url
:
/api/live/leave
params
:
channel_id
:
${channel_id}
...
...
@@ -47,4 +47,35 @@ leave:
json
:
{}
isLogin
:
1
#用户-发送弹幕
sendmsg
:
method
:
POST
url
:
/api/live/sendmsg
params
:
{}
data
:
channel_id
:
${channel_id}
msg
:
${msg}
json
:
{}
isLogin
:
1
#直播结束-主播下播
finish
:
method
:
POST
url
:
/api/live/finish
params
:
version
:
${version}
data
:
channel_id
:
${channel_id}
json
:
{}
isLogin
:
1
#主播-分享按钮的点击
get_live_info_audience
:
method
:
GET
url
:
/api/live/get_live_info/audience
params
:
channel_id
:
${channel_id}
version
:
${version}
data
:
{}
json
:
{}
isLogin
:
1
all_backend_api/order_request.py
0 → 100644
View file @
edf059f6
import
path_setting
from
in_common.base_request
import
BaseRequest
class
order_request
(
BaseRequest
):
def
__init__
(
self
):
self
.
data
=
self
.
api_load
(
path_setting
.
ORDER_CONFIG
)
# 我的订单列表
def
is_exist
(
self
):
return
self
.
api_send
(
self
.
data
[
"is_exist"
])
all_backend_api/order_request.yaml
0 → 100644
View file @
edf059f6
#发帖子用来判断订单是否存在的
is_exist
:
method
:
get
url
:
/api/order/is_exist
params
:
data
:
{}
json
:
{}
isLogin
:
1
all_backend_api/tag_request.py
0 → 100644
View file @
edf059f6
import
path_setting
from
in_common.base_request
import
BaseRequest
class
tag_request
(
BaseRequest
):
def
__init__
(
self
):
self
.
data
=
self
.
api_load
(
path_setting
.
TAG_CONFIG
)
# 进入发帖子页面-选择医院
def
list
(
self
,
level
=
3
,
tag_from
=
1
):
self
.
params
[
"level"
]
=
level
self
.
params
[
"tag_from"
]
=
tag_from
return
self
.
api_send
(
self
.
data
[
"list"
])
# 直播开播新加标签
def
tag_add
(
self
,
name
):
self
.
params
[
"name"
]
=
name
return
self
.
api_send
(
self
.
data
[
"tag_add"
])
if
__name__
==
'__main__'
:
print
(
tag_request
()
.
tag_add
(
"你好"
))
all_backend_api/tag_request.yaml
0 → 100644
View file @
edf059f6
#发帖子&写日记&提问题--选择标签--现在默认是三级标签
list
:
method
:
get
url
:
/api/tag/list
params
:
level
:
${level}
tag_from
:
${tag_from}
data
:
json
:
{}
isLogin
:
1
#需要登录添加这个字段,值为1 0是不需要登录的情况,如不需要登录,可以不添加这个字段
#新增标签
tag_add
:
method
:
post
url
:
/api/tag/add
params
:
{}
data
:
name
:
${name}
json
:
{}
isLogin
:
1
all_backend_api/topic_request.py
View file @
edf059f6
...
...
@@ -21,8 +21,13 @@ class topic_request(BaseRequest):
self
.
params
[
"topic_id"
]
=
topic_id
return
self
.
api_send
(
self
.
data
[
"detail"
])
# 进入发帖子页面-选择医院
def
to_hospital_list
(
self
):
return
self
.
api_send
(
self
.
data
[
"to_hospital_list"
])
# # 进入发帖子页面-选择美购--医生账号没发走暂时注释
# def to_service_list(self):
# return self.api_send(self.data["to_service_list"])
...
...
all_backend_api/topic_request.yaml
View file @
edf059f6
...
...
@@ -29,39 +29,24 @@ detail:
isLogin
:
1
#需要登录添加这个字段,值为1 0是不需要登录的情况,如不需要登录,可以不添加这个字段
#发帖子--选择医院
to_hospital_list
:
method
:
get
url
:
/api/topic/to_hospital_list
params
:
data
:
json
:
{}
isLogin
:
1
#需要登录添加这个字段,值为1 0是不需要登录的情况,如不需要登录,可以不添加这个字段
##
日记贴相关美购--暂时没有
#to
pic_service
:
##
发帖子--选择美购【医生账号不走这个接口--一般用户走,医生账号没发走】--所以暂时注释掉
#to
_service_list
:
# method: get
# url: /api/
diary/services
# url: /api/
topic/to_service_list
# params:
# diary_id: ${diary_id}
# service_id: ${service_id}
# data:
# json: {}
# isLogin: 1 #需要登录添加这个字段,值为1 0是不需要登录的情况,如不需要登录,可以不添加这个字段
##日记贴一级评论创建[这个是非本身日记贴:21116006]--暂时未解决复写yaml文件的问题所以单独把创建评论踢出去
#reply_create:
# method: post
# url: /api/topic/reply/create/21249632/
# params:
# channel: ${channel}
# data:
# content: ${content}
# json: {}
# isLogin: 1 #需要登录添加这个字段,值为1 0是不需要登录的情况,如不需要登录,可以不添加这个字段
#
#
##日记贴二级评论创建[这个是非本身日记贴:21116006]
#sub_reply_create:
# method: post
# url: /api/topic/reply/create/21249632/
# params:
# channel: ${channel}
# data:
# content: ${content}
# replied_id: ${replied_id}
# json: {}
# isLogin: 1 #需要登录添加这个字段,值为1 0是不需要登录的情况,如不需要登录,可以不添加这个字段
\ No newline at end of file
path_setting.py
View file @
edf059f6
...
...
@@ -12,12 +12,11 @@ LOGIN_VFC = os.path.join(BASE_DIR, "backend_auto/test_backend_data/account_data"
# 日记本总接口配置
DIARY_CONFIG
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/all_backend_api"
,
"diary_request.yaml"
)
#日记本详情页--字段判空
#
日记本详情页--字段判空
DIARY_DATA
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_backend_data/diary_data"
,
"topic_data.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
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_backend_data/diary_data"
,
"diary_operation.yaml"
)
...
...
@@ -25,6 +24,13 @@ DIARY_OPERATION = os.path.join(BASE_DIR, "backend_auto/test_backend_data/diary_d
DIARY_UPDATE
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_backend_data/diary_data"
,
"diary_update.yaml"
)
# 日记本创建添加医院-- auto_complete 总配置项
AUTO_COMPLE_CONFIG
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/all_backend_api"
,
"auto_complete_request.yaml"
)
AUTO_COMPLE_HOSPITAL
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_backend_data/auto_complete_data"
,
"hospital.yaml"
)
# 日记本创建添加医生
AUTO_COMPLE_DOCTOR
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_backend_data/auto_complete_data"
,
"doctor.yaml"
)
# 日记本进入相册页
DIARY_ALBUM_CONFIG
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/all_backend_api"
,
"hybrid_diary_request.yaml"
)
DIARY_ALBUM
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_backend_data/hybrid_data"
,
"diary_album.yaml"
)
...
...
@@ -85,10 +91,26 @@ 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"
)
# 发帖子--帖子医院选择
TRACTATE_HOSIPITAL
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_backend_data/topic_data"
,
"to_hospital_list.yaml"
)
# 发帖子--帖子美购选择
TRACTATE_SERVICE
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_backend_data/topic_data"
,
"to_service_list.yaml"
)
# 发帖子--帖子订单选择 --也是order的总配置项
ORDER_CONFIG
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/all_backend_api"
,
"order_request.yaml"
)
TRACTATE_ORDER
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_backend_data/order_data"
,
"is_exist.yaml"
)
# 写日记&提问题&发帖子--标签选择--也是tag的总配置项
TAG_CONFIG
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/all_backend_api"
,
"tag_request.yaml"
)
DETAIL_TAG
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_backend_data/tag_data"
,
"list.yaml"
)
# 问答详情页--问题详情
QUESTION_DETAIL
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_backend_data/hybrid_data"
,
"question_v1.yaml"
)
# 问答详情页--回答列表
...
...
@@ -308,7 +330,8 @@ LIVEYAML_CONFIG = os.path.join(BASE_DIR, "backend_auto/all_backend_api", "live_r
DANMU_V2
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_backend_data/live_data"
,
"danmu_v2.yaml"
)
#直播-主播开播
PUSH_LIVE_INFO
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_backend_data/live_data"
,
"pushlive_info.yaml"
)
#直播-发送弹幕
SENDMSG
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_backend_data/live_data"
,
"sendmsg.yaml"
)
#商祥页-详情
...
...
@@ -540,6 +563,11 @@ PAGE_RULES = os.path.join(BASE_DIR, "backend_auto/test_backend_data/janus_data",
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"
)
#主播-获取美颜效果
#BEAUTY_CONFIG = os.path.join(BASE_DIR, "backend_auto/all_backend_api", "janus_request.yaml")
BEAUTY
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_backend_data/janus_data"
,
"beauty.yaml"
)
BEAUTY_POST
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_backend_data/janus_data"
,
"beauty_post.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"
)
...
...
@@ -585,6 +613,18 @@ ENTER = os.path.join(BASE_DIR, "backend_auto/test_backend_data/live_data", "ente
LEAVE_CONFIG
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/all_backend_api"
,
"live_request.yaml"
)
LEAVE
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_backend_data/live_data"
,
"leave.yaml"
)
#直播结束-主播下播
FINISH_CONFIG
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/all_backend_api"
,
"live_request.yaml"
)
FINISH
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_backend_data/live_data"
,
"finish.yaml"
)
#主播标记讲解商品+取消标记
MARK_LIVE_SERVICE_CONFIG
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/all_backend_api"
,
"janus_live_request.yaml"
)
MARK_LIVE_SERVICE
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_backend_data/janus_live_data"
,
"mark_live_service.yaml"
)
#主播-分享按钮的点击
GET_LIVE_INFO_AUDIENCE_CONFIG
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/all_backend_api"
,
"live_request.yaml"
)
GET_LIVE_INFO_AUDIENCE
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_backend_data/live_data"
,
"get_live_info_audience.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"
)
...
...
@@ -617,5 +657,9 @@ FAVORS_SERVICES = os.path.join(BASE_DIR, "backend_auto/test_backend_data/user_da
#我的-帖子-我回复的
REPLY_TRACTATE_CONFIG
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/all_backend_api"
,
"user_request.yaml"
)
REPLY_TRACTATE
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_backend_data/user_data"
,
"reply_tractate.yaml"
)
#直播-新增标签
TAG_CONFIG
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/all_backend_api"
,
"tag_request.yaml"
)
TAG_ADD
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_backend_data/tag_data"
,
"tag_add.yaml"
)
if
__name__
==
'__main__'
:
print
(
"=========="
,
LIVEYAML_CONFIG
)
test_backend_case/auto_complete_case/__init__.py
0 → 100644
View file @
edf059f6
test_backend_case/auto_complete_case/test_doctpr.py
0 → 100644
View file @
edf059f6
import
pytest
from
ids_list
import
get_ids
import
path_setting
from
in_common.base_request
import
BaseRequest
from
all_backend_api.auto_complete_request
import
auto_complete_request
class
TestDoctor
:
data
=
BaseRequest
()
.
api_load
(
path_setting
.
AUTO_COMPLE_DOCTOR
)
doctor_case
,
doctor_data
=
get_ids
(
data
,
"doctor"
)
@pytest.mark.parametrize
(
"param"
,
doctor_data
,
ids
=
doctor_case
)
def
test_doctor
(
self
,
param
):
r
=
auto_complete_request
()
.
doctor
(
param
[
"q"
])
if
r
[
"error"
]
==
0
:
data
=
r
[
"data"
]
assert
len
(
data
)
>
param
[
"assert"
]
test_backend_case/auto_complete_case/test_hospital.py
0 → 100644
View file @
edf059f6
import
pytest
from
ids_list
import
get_ids
import
path_setting
from
in_common.base_request
import
BaseRequest
from
all_backend_api.auto_complete_request
import
auto_complete_request
class
TestDoctor
:
data
=
BaseRequest
()
.
api_load
(
path_setting
.
AUTO_COMPLE_HOSPITAL
)
hospital_case
,
hospital_data
=
get_ids
(
data
,
"hospital"
)
@pytest.mark.parametrize
(
"param"
,
hospital_data
,
ids
=
hospital_case
)
def
test_doctor
(
self
,
param
):
r
=
auto_complete_request
()
.
hospital
(
param
[
"q"
])
if
r
[
"error"
]
==
0
:
data
=
r
[
"data"
]
assert
len
(
data
)
>
param
[
"assert"
]
test_backend_case/diary_case/test_service.py
View file @
edf059f6
...
...
@@ -7,36 +7,25 @@ from all_backend_api.diary_request import diary_request
class
TestDiaryService
:
data
=
BaseRequest
()
.
api_load
(
path_setting
.
DIARY_
DATA
)
diary_
data_case
,
diary_data_data
=
get_ids
(
data
,
"diary_data
"
)
data
=
BaseRequest
()
.
api_load
(
path_setting
.
DIARY_
SERVICE
)
diary_
service_case
,
diary_service_data
=
get_ids
(
data
,
"diary_service
"
)
@pytest.mark.parametrize
(
"param"
,
diary_data_data
,
ids
=
diary_data
_case
)
def
test_diary_service
(
self
,
param
):
@pytest.mark.parametrize
(
"param"
,
diary_service_data
,
ids
=
diary_service
_case
)
def
test_diary_service
(
self
,
param
):
# print(2)
r
=
diary_request
()
.
diary_
data
(
param
[
"current_city_id"
],
param
[
"diary_referrer"
],
param
[
"sort"
],
param
[
"count"
],
param
[
"start_num
"
])
r
=
diary_request
()
.
diary_
service
(
param
[
"diary_id"
],
param
[
"service_id
"
])
# print(r)
if
r
[
"error"
]
==
0
:
assert
r
[
"error"
]
==
param
[
"assert"
]
# 先判断有没有日记,然后判断日记本里面需要的那些字段,如点赞字段,日记总数等,不传值,传空值
if
r
[
"data"
]:
assert
r
[
"data"
][
0
][
"post_date"
]
is
not
None
and
r
[
"data"
][
0
][
"post_date"
]
is
not
""
#c创建时间
assert
r
[
"data"
][
0
][
"diary_num"
]
is
not
None
and
r
[
"data"
][
0
][
"diary_num"
]
is
not
""
#日记总数
assert
r
[
"data"
][
0
][
"view_count"
]
is
not
None
and
r
[
"data"
][
0
][
"view_count"
]
is
not
""
#浏览次数
assert
r
[
"data"
][
0
][
"is_liked"
]
is
not
None
and
r
[
"data"
][
0
][
"is_liked"
]
is
not
""
#是否点赞
assert
r
[
"data"
][
0
][
"operation_day"
]
is
not
None
and
r
[
"data"
][
0
][
"operation_day"
]
is
not
""
#术后多少天
assert
r
[
"data"
][
0
][
"vote_count"
]
is
not
None
and
r
[
"data"
][
0
][
"vote_count"
]
is
not
""
#点赞总数
assert
r
[
"data"
][
0
][
"reply_count"
]
is
not
None
and
r
[
"data"
][
0
][
"reply_count"
]
is
not
""
#评论总数
assert
r
[
"data"
][
0
][
"id"
]
is
not
None
and
r
[
"data"
][
0
][
"id"
]
is
not
""
#日记贴id
# 判断评论列表里面的用户信息是否为空,先判断有没有评论
if
r
[
"data"
][
0
][
"comments"
]:
assert
r
[
"data"
][
0
][
"comments"
][
0
][
"user_id"
]
is
not
None
and
r
[
"data"
][
0
][
"comments"
][
0
][
"user_id"
]
is
not
""
#用户id
assert
r
[
"data"
][
0
][
"comments"
][
0
][
"nick_name"
]
is
not
None
and
r
[
"data"
][
0
][
"comments"
][
0
][
"nick_name"
]
is
not
""
#用户名
assert
r
[
"data"
][
0
][
"comments"
][
0
][
"gm_url"
]
is
not
None
and
r
[
"data"
][
0
][
"comments"
][
0
][
"gm_url"
]
is
not
""
#点击头像跳转链接
# assert(r[""])
if
r
[
"error"
]
==
1
:
assert
r
[
"error"
]
==
param
[
"assert"
]
# 先判断有没有美购的字段,没有就检验接口就行,然后判断接口里面需要的那些字段是否不传值,传空值
if
r
[
"data"
][
"service_data"
]:
assert
r
[
"data"
][
"service_data"
][
"gengmei_price"
]
is
not
None
and
r
[
"data"
][
"service_data"
][
"gengmei_price"
]
is
not
""
# 更美价
assert
r
[
"data"
][
"service_data"
][
"service_name"
]
is
not
None
and
r
[
"data"
][
"service_data"
][
"service_name"
]
is
not
""
# 美购名称
assert
r
[
"data"
][
"service_data"
][
"gm_url"
]
is
not
None
and
r
[
"data"
][
"service_data"
][
"gm_url"
]
is
not
""
# 跳转链接
assert
r
[
"data"
][
"service_data"
][
"is_seckill"
]
is
not
None
and
r
[
"data"
][
"service_data"
][
"is_seckill"
]
is
not
""
# 是否秒杀
...
...
test_backend_case/gmai_case/test_simulate_analyze.py
View file @
edf059f6
...
...
@@ -15,7 +15,9 @@ class TestSimulateAnalyze:
r
=
gmai_request
()
.
simulate_analyze
(
param
[
"device_id"
],
param
[
"image_url"
],
param
[
"style_id"
]
,
param
[
"type_id"
])
assert
r
[
"error"
]
==
0
gm_url
=
r
[
"data"
][
"plastic_image_url"
]
content
=
r
[
"data"
][
"content"
]
print
(
"效果图: "
,
gm_url
)
print
(
"效果文案: "
,
content
)
before_charm_val
=
r
[
"data"
][
"before_charm_val"
]
after_charm_val
=
r
[
"data"
][
"after_charm_val"
]
assert
before_charm_val
<
after_charm_val
\ No newline at end of file
test_backend_case/janus_case/test_beauty.py
0 → 100644
View file @
edf059f6
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
TestBeauty
:
data
=
BaseRequest
()
.
api_load
(
path_setting
.
BEAUTY
)
beauty_case
,
beauty_data
=
get_ids
(
data
,
"beauty"
)
@pytest.mark.parametrize
(
"param"
,
beauty_data
,
ids
=
beauty_case
)
def
test_beauty
(
self
,
param
):
print
(
"******************"
)
r
=
janus_request
()
.
beauty
(
param
[
"channel_id"
])
if
r
[
"error"
]
==
0
:
assert
r
[
"error"
]
==
param
[
"assert"
]
test_backend_case/janus_case/test_beauty_post.py
0 → 100644
View file @
edf059f6
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
TestBeautyPost
:
data
=
BaseRequest
()
.
api_load
(
path_setting
.
BEAUTY_POST
)
beauty_post_case
,
beauty_post_data
=
get_ids
(
data
,
"beauty_post"
)
@pytest.mark.parametrize
(
"param"
,
beauty_post_data
,
ids
=
beauty_post_case
)
def
test_beauty_post
(
self
,
param
):
r
=
janus_request
()
.
beauty_post
(
param
[
"channel_id"
],
param
[
"is_open"
],
param
[
"smooth"
],
param
[
"white"
],
param
[
"rosy"
])
if
r
[
"error"
]
==
0
:
assert
r
[
"error"
]
==
param
[
"assert"
]
test_backend_case/janus_live_case/test_mark_live_service.py
0 → 100644
View file @
edf059f6
import
pytest
import
path_setting
from
all_backend_api.janus_live_request
import
live_request
from
ids_list
import
get_ids
from
in_common.base_request
import
BaseRequest
class
TestMarkLiveService
:
data
=
BaseRequest
()
.
api_load
(
path_setting
.
MARK_LIVE_SERVICE
)
mark_live_service_case
,
mark_live_service_data
=
get_ids
(
data
,
"mark_live_service"
)
@pytest.mark.parametrize
(
"param"
,
mark_live_service_data
,
ids
=
mark_live_service_case
)
def
test_mark_live_service
(
self
,
param
):
print
(
111111111111111111111
)
r
=
live_request
()
.
mark_live_service
(
param
[
"stream_id"
],
param
[
"channel_id"
],
param
[
"live_service_id"
],
param
[
"mark_status"
],
param
[
"version"
])
if
r
[
"error"
]
==
0
:
assert
r
[
"data"
][
"toast"
]
==
param
[
"assert"
]
\ No newline at end of file
test_backend_case/live_case/test_finish.py
0 → 100644
View file @
edf059f6
import
pytest
from
ids_list
import
get_ids
import
path_setting
from
in_common.base_request
import
BaseRequest
from
all_backend_api.live_request
import
living_request
class
TestFinish
:
data
=
BaseRequest
()
.
api_load
(
path_setting
.
FINISH
)
finish_case
,
finish_data
=
get_ids
(
data
,
"finish"
)
@pytest.mark.parametrize
(
"param"
,
finish_data
,
ids
=
finish_case
)
def
test_finish
(
self
,
param
):
r
=
living_request
()
.
finish
(
param
[
"channel_id"
],
param
[
"version"
])
print
(
"主播下播了,呜呜呜"
)
if
r
[
"error"
]
==
0
:
assert
r
[
"error"
]
==
param
[
"assert"
]
\ No newline at end of file
test_backend_case/live_case/test_get_live_info_audience.py
0 → 100644
View file @
edf059f6
import
pytest
from
ids_list
import
get_ids
import
path_setting
from
in_common.base_request
import
BaseRequest
from
all_backend_api.live_request
import
living_request
class
TestGetLiveInfoAudience
:
data
=
BaseRequest
()
.
api_load
(
path_setting
.
GET_LIVE_INFO_AUDIENCE
)
get_live_info_audience_case
,
get_live_info_audience_data
=
get_ids
(
data
,
"get_live_info_audience"
)
@pytest.mark.parametrize
(
"param"
,
get_live_info_audience_data
,
ids
=
get_live_info_audience_case
)
def
test_get_live_info_audience
(
self
,
param
):
r
=
living_request
()
.
get_live_info_audience
(
param
[
"channel_id"
],
param
[
"version"
])
print
(
"主播分享直播间"
)
if
r
[
"error"
]
==
0
:
assert
r
[
"data"
][
"channel_id"
]
==
param
[
"assert"
]
assert
r
[
"data"
][
"share_data"
][
"wechat"
][
"title"
][
0
:
7
]
==
param
[
"assert0"
]
assert
r
[
"data"
][
"share_data"
][
"wechatline"
][
"title"
][
0
:
7
]
==
param
[
"assert0"
]
assert
r
[
"data"
][
"share_data"
][
"qq"
][
"title"
][
0
:
7
]
==
param
[
"assert0"
]
\ No newline at end of file
test_backend_case/live_case/test_sendmsg.py
0 → 100644
View file @
edf059f6
import
pytest
from
ids_list
import
get_ids
import
path_setting
from
in_common.base_request
import
BaseRequest
from
all_backend_api.live_request
import
living_request
#@pytest.fixture(scope='function')
#def create_live():
# pass
class
TestSendmsg
:
data
=
BaseRequest
()
.
api_load
(
path_setting
.
SENDMSG
)
sendmsg_case
,
sendmsg_data
=
get_ids
(
data
,
"sendmsg"
)
@pytest.mark.parametrize
(
"param"
,
sendmsg_data
,
ids
=
sendmsg_case
)
def
test_sendmsg
(
self
,
param
):
r
=
living_request
()
.
sendmsg
(
param
[
"channel_id"
],
param
[
"msg"
])
if
r
[
"error"
]
==
0
:
assert
r
[
"error"
]
==
param
[
"assert"
]
if
r
[
"error"
]
==
1
:
assert
r
[
"message"
]
==
param
[
"assert"
]
\ No newline at end of file
test_backend_case/order_case/__init__.py
0 → 100644
View file @
edf059f6
test_backend_case/order_case/test_is_exist.py
0 → 100644
View file @
edf059f6
import
pytest
from
ids_list
import
get_ids
import
path_setting
from
in_common.base_request
import
BaseRequest
from
all_backend_api.order_request
import
order_request
class
TestIsExist
:
data
=
BaseRequest
()
.
api_load
(
path_setting
.
TRACTATE_ORDER
)
is_exsit_case
,
is_exsit_data
=
get_ids
(
data
,
"is_exist"
)
@pytest.mark.parametrize
(
"param"
,
is_exsit_data
,
ids
=
is_exsit_case
)
def
test_is_exsit
(
self
,
param
):
r
=
order_request
()
.
is_exist
()
assert
r
[
"error"
]
==
0
assert
r
[
"data"
][
"result"
]
is
True
# if r["error"] == 0:
# assert r["data"]["result"] is True
\ No newline at end of file
test_backend_case/orders_case/test_orders_my_v2_used.py
0 → 100644
View file @
edf059f6
import
pytest
from
ids_list
import
get_ids
import
path_setting
from
in_common.base_request
import
BaseRequest
from
all_backend_api.orders_request
import
orders_request
class
TestOrdersMyV2Used
:
data
=
BaseRequest
()
.
api_load
(
path_setting
.
ORDERS_MY_V2_DATA
)
my_order_used_case
,
my_order_used_data
=
get_ids
(
data
,
"used"
)
@pytest.mark.parametrize
(
"param"
,
my_order_used_data
,
ids
=
my_order_used_case
)
def
test_orders_used
(
self
,
param
):
no_more_data
=
False
i
=
0
found_usedBeautycard
=
False
while
no_more_data
is
False
:
r
=
orders_request
()
.
my_v2
(
i
*
10
,
param
[
"status"
],
param
[
"version"
])
i
+=
1
no_more_data
=
r
[
"data"
][
"no_more_data"
]
for
order
in
r
[
"data"
][
"orders"
]:
if
order
[
"type"
]
==
4
and
order
[
"order"
][
"order_status"
][
"status"
]
==
5
:
found_usedBeautycard
=
True
order_id
=
order
[
"order"
][
"order_id"
]
print
(
"次卡单id: "
,
order_id
)
# 按钮文案
text
=
order
[
"order"
][
"order_status"
][
"text"
]
assert
text
==
"已使用"
assert
order
[
"gm_url"
]
==
"gengmei://order_beauty_card_detail?order_id={}&type=4"
.
format
(
order_id
)
# 按钮信息
buttons_title
=
order
[
"buttons"
][
0
][
"title"
]
buttons_url
=
order
[
"buttons"
][
0
][
"url"
]
assert
buttons_title
==
"立即领取面膜"
assert
buttons_url
==
"gengmei://common_webview?url=https://backend.igengmei.com/phantom/visual_special/2340"
# 7.46.0加的头图信息
icon_url
=
order
[
"header"
][
"icon_url"
]
gm_url
=
order
[
"header"
][
"gm_url"
]
title
=
order
[
"header"
][
"title"
]
break
if
found_usedBeautycard
:
break
test_backend_case/orders_case/test_orders_my_v2_waituse.py
View file @
edf059f6
...
...
@@ -23,7 +23,7 @@ class TestOrdersMyV2Waituse:
order_status
=
order
[
"order"
][
"order_status"
][
"status"
]
order_statust
=
order
[
"order"
][
"order_status"
][
"text"
]
gm_url
=
order
[
"gm_url"
]
print
(
order_id
,
order_status
,
order_statust
,
gm_url
)
#
print(order_id, order_status, order_statust, gm_url)
assert
order_status
==
param
[
"beauty_card_order_status"
]
assert
order_statust
==
param
[
"beauty_card_order_statust"
]
assert
gm_url
==
param
[
"beauty_card_order_gmurl"
]
.
format
(
order_id
)
...
...
@@ -35,6 +35,13 @@ class TestOrdersMyV2Waituse:
# 7.44.0加的领取面膜按钮
beauty_card_free_service_title
=
order
[
"buttons"
][
1
][
"title"
]
assert
beauty_card_free_service_title
==
param
[
"beauty_card_button_mianmo_title"
]
# 7.46.0加的头图信息
icon_url
=
order
[
"header"
][
"icon_url"
]
gm_url
=
order
[
"header"
][
"gm_url"
]
title
=
order
[
"header"
][
"title"
]
# print(icon_url, gm_url, title)
assert
icon_url
==
param
[
"beauty_card_header_icon"
]
assert
gm_url
not
in
(
None
,
""
)
# 普通美购订单
if
order
[
"type"
]
==
0
:
# 订单信息
...
...
@@ -43,5 +50,16 @@ class TestOrdersMyV2Waituse:
order_statust
=
order
[
"order"
][
"order_status"
][
"text"
]
assert
order_status
==
param
[
"putong_card_order_status"
]
assert
order_statust
==
param
[
"putong_card_order_statust"
]
print
(
order_status
,
order_statust
)
# print(order_status, order_statust)
# 医生的医院信息
doctor_hospital_id
=
order
[
"order"
][
"doctor_hospital_id"
]
# 7.46.0增加头图信息
xcx_url
=
order
[
"header"
][
"xcx_url"
]
icon_url
=
order
[
"header"
][
"icon_url"
]
gm_url
=
order
[
"header"
][
"gm_url"
]
title
=
order
[
"header"
][
"title"
]
print
(
xcx_url
,
icon_url
,
gm_url
,
title
)
assert
xcx_url
==
"/packageBusiness/pages/org/main?hospital_id={}"
.
format
(
doctor_hospital_id
)
assert
icon_url
is
not
""
assert
gm_url
==
"gengmei://organization_detail?organization_id={}"
.
format
(
doctor_hospital_id
)
assert
title
is
not
""
test_backend_case/tag_case/__init__.py
0 → 100644
View file @
edf059f6
test_backend_case/tag_case/test_list.py
0 → 100644
View file @
edf059f6
import
pytest
from
ids_list
import
get_ids
import
path_setting
from
in_common.base_request
import
BaseRequest
from
all_backend_api.tag_request
import
tag_request
class
TestList
:
data
=
BaseRequest
()
.
api_load
(
path_setting
.
DETAIL_TAG
)
tag_list_case
,
tag_list_data
=
get_ids
(
data
,
"list"
)
@pytest.mark.parametrize
(
"param"
,
tag_list_data
,
ids
=
tag_list_case
)
def
test_to_hospital_list
(
self
,
param
):
r
=
tag_request
()
.
list
()
assert
r
[
"error"
]
==
0
assert
len
(
r
[
"data"
])
>
0
# if r["error"] == 0:
# assert r["data"]["result"] is True
\ No newline at end of file
test_backend_case/tag_case/test_tag_add.py
0 → 100644
View file @
edf059f6
import
pytest
from
ids_list
import
get_ids
import
path_setting
from
in_common.base_request
import
BaseRequest
from
all_backend_api.tag_request
import
tag_request
class
TestTagAdd
:
data
=
BaseRequest
()
.
api_load
(
path_setting
.
TAG_ADD
)
tag_add_case
,
tag_add_data
=
get_ids
(
data
,
"tag_add"
)
@pytest.mark.parametrize
(
"param"
,
tag_add_data
,
ids
=
tag_add_case
)
def
test_tag_add
(
self
,
param
):
r
=
tag_request
()
.
tag_add
(
param
[
"name"
])
if
r
[
"error"
]
==
0
:
assert
r
[
"error"
]
==
param
[
"assert"
]
\ No newline at end of file
test_backend_case/topic_case/test_to_hospital_list.py
0 → 100644
View file @
edf059f6
import
pytest
from
ids_list
import
get_ids
import
path_setting
from
in_common.base_request
import
BaseRequest
from
all_backend_api.topic_request
import
topic_request
class
TestT0HospitalList
:
data
=
BaseRequest
()
.
api_load
(
path_setting
.
TRACTATE_HOSIPITAL
)
to_hospital_list_case
,
to_hospital_list_data
=
get_ids
(
data
,
"to_hospital_list"
)
@pytest.mark.parametrize
(
"param"
,
to_hospital_list_data
,
ids
=
to_hospital_list_case
)
def
test_to_hospital_list
(
self
,
param
):
r
=
topic_request
()
.
to_hospital_list
()
assert
r
[
"error"
]
==
0
assert
len
(
r
[
"data"
])
>
0
# if r["error"] == 0:
# assert r["data"]["result"] is True
\ No newline at end of file
test_backend_case/topic_case/test_to_service_list.py
0 → 100644
View file @
edf059f6
# 等之后把用户账号和医生账号切换了再写上去--目前医生不走这个接口
# import pytest
# from ids_list import get_ids
# import path_setting
# from in_common.base_request import BaseRequest
# from all_backend_api.topic_request import topic_request
#
#
# class TestToServiceList:
# data = BaseRequest().api_load(path_setting.TRACTATE_SERVICE)
# to_service_list_case, to_service_list_data = get_ids(data,"to_service_list")
#
# @pytest.mark.parametrize("param", to_service_list_data, ids=to_service_list_case)
# def test_to_hospital_list(self,param):
# r = topic_request().to_service_list()
# assert r["error"] == 0 # 这个接口没啥可以校验的,简单的不报错就行。
#
# # assert len(r["data"]) > 0
# # if r["error"] == 0:
# # assert r["data"]["result"] is True
\ No newline at end of file
test_backend_data/auto_complete_data/__init__.py
0 → 100644
View file @
edf059f6
test_backend_data/auto_complete_data/doctor.yaml
0 → 100644
View file @
edf059f6
doctor
:
#收藏case--无须字段
-
case
:
"
日记本添加医生--数据检验"
q
:
"
2"
assert
:
0
test_backend_data/auto_complete_data/hospital.yaml
0 → 100644
View file @
edf059f6
hospital
:
#收藏case--无须字段
-
case
:
"
日记本添加医院--数据检验"
q
:
"
1"
assert
:
0
test_backend_data/diary_data/diary_service.yaml
View file @
edf059f6
diary_service
:
#字段正常case
-
case
:
"
有推荐美购的日记
--有外显评论
"
diary_id
:
"
"
service_id
:
58
15774
case
:
"
有推荐美购的日记"
diary_id
:
17586147
service_id
:
58
78139
assert
:
0
-
case
:
"
接口传参数失败,但不报错case"
current_city_id
:
"
beijing"
diary_referrer
:
"
my_diary"
sort
:
0
count
:
8
start_num
:
2
case
:
"
已下线的推荐美购的日记"
diary_id
:
17586094
service_id
:
5885050
assert
:
0
-
case
:
"
没有推荐美购的日记"
diary_id
:
17586140
service_id
:
assert
:
0
test_backend_data/gmai_data/simulate_analyze.yaml
View file @
edf059f6
...
...
@@ -43,4 +43,19 @@ simulate_analyze:
device_id
:
"
869412032478155"
image_url
:
"
2021/06/07/1451/86b01d9a9d66"
style_id
:
2
type_id
:
8
\ No newline at end of file
type_id
:
8
#模拟口红
-
case
:
"
蜜桃粉口红效果"
device_id
:
"
androidid_7255c3398845cdd5"
image_url
:
"
2021/07/20/1431/9d8709706125"
style_id
:
1
type_id
:
10
-
case
:
"
复古红口红效果"
device_id
:
"
androidid_7255c3398845cdd5"
image_url
:
"
2021/07/20/1431/9d8709706125"
style_id
:
3
type_id
:
10
\ No newline at end of file
test_backend_data/janus_data/beauty.yaml
0 → 100644
View file @
edf059f6
beauty
:
-
case
:
"
主播获取美颜效果"
channel_id
:
"
739"
assert
:
0
\ No newline at end of file
test_backend_data/janus_data/beauty_post.yaml
0 → 100644
View file @
edf059f6
beauty_post
:
-
case
:
"
主播更改美颜效果"
channel_id
:
"
739"
is_open
:
"
true"
smooth
:
"
0.60"
white
:
"
0.40"
rosy
:
"
0.70"
assert
:
0
-
case
:
"
主播关闭美颜"
channel_id
:
"
739"
is_open
:
"
false"
smooth
:
"
0"
white
:
"
0"
rosy
:
"
0"
assert
:
0
\ No newline at end of file
test_backend_data/janus_live_data/mark_live_service.yaml
0 → 100644
View file @
edf059f6
mark_live_service
:
#主播-主播标记讲解商品
-
case
:
"
主播-主播标记讲解商品"
stream_id
:
"
4233"
channel_id
:
"
745"
live_service_id
:
"
7269"
mark_status
:
"
1"
version
:
"
7.45.0"
assert
:
操作成功
#主播-主播取消标记讲解商品
-
case
:
"
主播-主播取消标记讲解商品"
stream_id
:
"
4233"
channel_id
:
"
745"
live_service_id
:
"
7269"
mark_status
:
"
0"
version
:
"
7.45.0"
assert
:
操作成功
test_backend_data/live_data/finish.yaml
0 → 100644
View file @
edf059f6
finish
:
#主播下播了,呜呜呜
-
case
:
"
主播下播了,呜呜呜"
channel_id
:
"
745"
version
:
"
7.45.0"
assert
:
0
\ No newline at end of file
test_backend_data/live_data/get_live_info_audience.yaml
0 → 100644
View file @
edf059f6
get_live_info_audience
:
#主播分享直播间
-
case
:
"
主播分享直播间"
channel_id
:
"
745"
version
:
"
7.45.0"
assert
:
745
assert0
:
更美APP直播
\ No newline at end of file
test_backend_data/live_data/sendmsg.yaml
0 → 100644
View file @
edf059f6
sendmsg
:
#发送弹幕
-
case
:
"
发送弹幕"
channel_id
:
"
726"
msg
:
"
主播可真美"
assert
:
0
#弹幕内容包含敏感信息,发送失败
-
case
:
"
弹幕内容包含敏感信息,发送失败"
channel_id
:
"
784"
msg
:
"
黄色图片"
assert
:
您输入的内容包含敏感信息,请重新输入
\ No newline at end of file
test_backend_data/order_data/__init__.py
0 → 100644
View file @
edf059f6
test_backend_data/order_data/is_exist.yaml
0 → 100644
View file @
edf059f6
is_exist
:
#帖子撰写时选择订单
-
case
:
"
帖子详情页--撰写内容时选择订单"
assert
:
0
message
:
"
"
test_backend_data/orders_data/my_v2.yaml
View file @
edf059f6
...
...
@@ -12,4 +12,14 @@ waituse:
beauty_card_button_gmurl
:
"
gengmei://order_beauty_card_reserve?order_id={}"
beauty_card_button_mianmo_title
:
"
立即领取面膜"
putong_card_order_status
:
"
1"
putong_card_order_statust
:
"
待使用"
\ No newline at end of file
putong_card_order_statust
:
"
待使用"
beauty_card_header_icon
:
"
https://heras.igengmei.com/2021/06/23/2fe8088602"
used
:
#已使用的次卡订单
-
case
:
"
全部tab下已使用的次卡订单"
start_num
:
0
status
:
-1
version
:
"
7.44.0"
\ No newline at end of file
test_backend_data/tag_data/__init__.py
0 → 100644
View file @
edf059f6
test_backend_data/tag_data/list.yaml
0 → 100644
View file @
edf059f6
list
:
#详情页tag选择--默认参数tag_from: 1
-
case
:
"
详情页--撰写内容选择标签--发帖子&提问题"
assert
:
0
message
:
"
美
+1"
-
case
:
"
详情页--撰写内容选择标签--写日记&写回答"
assert
:
0
tag_from
:
0
test_backend_data/tag_data/tag_add.yaml
0 → 100644
View file @
edf059f6
tag_add
:
-
case
:
"
直播-新增标签"
name
:
"
小冤家专属标签"
assert
:
0
\ No newline at end of file
test_backend_data/topic_data/to_hospital_list.yaml
0 → 100644
View file @
edf059f6
to_hospital_list
:
#帖子撰写时选择医院
-
case
:
"
帖子详情页--撰写内容时选择医院"
assert
:
0
message
:
"
美
+1"
test_backend_data/topic_data/to_service_list.yaml
0 → 100644
View file @
edf059f6
to_service_list
:
#帖子撰写时选择美购
-
case
:
"
帖子详情页--撰写内容时选择购买过的美购"
assert
:
0
message
:
"
美
+1"
test_backend_data/topic_data/topic_reply_create.yaml
View file @
edf059f6
...
...
@@ -3,7 +3,7 @@ reply_create:
beuzhu
:
'
#
备注:
这个文件有冲突的话,那个版本都行不会影响,回退/接受当前版本都行,因为每次运行content都会改变'
case
:
日记贴一级评论创建--正常校验&创建二级评论--正常校验
channel
:
benzhan
content
:
ces测试+2021-07-
14 18:15:3
9
content
:
ces测试+2021-07-
22 18:42:5
9
message
:
请勿回复重复内容
message1
:
回复成功
message2
:
你的回复有点频繁,稍后再来
...
...
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