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
97c8e6db
Commit
97c8e6db
authored
Apr 23, 2021
by
aha
Browse files
Options
Browse Files
Download
Plain Diff
处理path_setting.py文件冲突
parents
ff788e17
75309f30
Show whitespace changes
Inline
Side-by-side
Showing
69 changed files
with
910 additions
and
6 deletions
+910
-6
.DS_Store
.DS_Store
+0
-0
conversation_request.py
all_backend_api/conversation_request.py
+23
-0
conversation_request.yaml
all_backend_api/conversation_request.yaml
+13
-0
doctor_request.py
all_backend_api/doctor_request.py
+19
-0
doctor_request.yaml
all_backend_api/doctor_request.yaml
+13
-0
hospital_request.py
all_backend_api/hospital_request.py
+19
-0
hospital_request.yaml
all_backend_api/hospital_request.yaml
+13
-0
hospitals_request.yaml
all_backend_api/hospitals_request.yaml
+2
-2
hospitals_v2_request.py
all_backend_api/hospitals_v2_request.py
+17
-0
hospitals_v2_request.yaml
all_backend_api/hospitals_v2_request.yaml
+12
-0
im_request.py
all_backend_api/im_request.py
+31
-0
im_request.yaml
all_backend_api/im_request.yaml
+28
-0
live_request.py
all_backend_api/live_request.py
+28
-0
live_request.yaml
all_backend_api/live_request.yaml
+26
-0
my_conversation_request.py
all_backend_api/my_conversation_request.py
+18
-0
my_conversation_request.yaml
all_backend_api/my_conversation_request.yaml
+12
-0
notification_request.py
all_backend_api/notification_request.py
+16
-0
notification_request.yaml
all_backend_api/notification_request.yaml
+11
-0
oneimage_request.py
all_backend_api/oneimage_request.py
+29
-0
oneimage_request.yaml
all_backend_api/oneimage_request.yaml
+18
-0
user_request.py
all_backend_api/user_request.py
+19
-0
user_request.yaml
all_backend_api/user_request.yaml
+11
-0
host.yaml
host.yaml
+2
-2
base_request.py
in_common/base_request.py
+6
-1
path_setting.py
path_setting.py
+65
-1
__init__.py
test_backend_case/conversation_case/__init__.py
+0
-0
test_message_read.py
test_backend_case/conversation_case/test_message_read.py
+22
-0
__init__.py
test_backend_case/doctor_case/__init__.py
+0
-0
test_article.py
test_backend_case/doctor_case/test_article.py
+18
-0
__init__.py
test_backend_case/hospital_case/__init__.py
+0
-0
test_diary.py
test_backend_case/hospital_case/test_diary.py
+18
-0
__init__.py
test_backend_case/hospitals_v2_case/__init__.py
+0
-0
test_services.py
test_backend_case/hospitals_v2_case/test_services.py
+29
-0
__init__.py
test_backend_case/im_case/__init__.py
+0
-0
test_auto_msg.py
test_backend_case/im_case/test_auto_msg.py
+18
-0
test_conversation_detail.py
test_backend_case/im_case/test_conversation_detail.py
+19
-0
__init__.py
test_backend_case/live_case/__init__.py
+0
-0
test_danmu_v2.py
test_backend_case/live_case/test_danmu_v2.py
+20
-0
test_pushlive_info.py
test_backend_case/live_case/test_pushlive_info.py
+21
-0
test_my_conversation.py
...backend_case/my_conversation_case/test_my_conversation.py
+21
-0
__init__.py
test_backend_case/notification_case/__init__.py
+0
-0
test_unread.py
test_backend_case/notification_case/test_unread.py
+32
-0
__init__.py
test_backend_case/oneimage_case/__init__.py
+0
-0
test_recomend_services.py
test_backend_case/oneimage_case/test_recomend_services.py
+24
-0
test_share_v4.py
test_backend_case/oneimage_case/test_share_v4.py
+22
-0
__init__.py
test_backend_case/user_case/__init__.py
+0
-0
test_answer.py
test_backend_case/user_case/test_answer.py
+18
-0
__init__.py
test_backend_data/conversation_data/__init__.py
+0
-0
message_read.yaml
test_backend_data/conversation_data/message_read.yaml
+10
-0
__init__.py
test_backend_data/doctor_data/__init__.py
+0
-0
article.yaml
test_backend_data/doctor_data/article.yaml
+6
-0
__init__.py
test_backend_data/hospital_data/__init__.py
+0
-0
diary.yaml
test_backend_data/hospital_data/diary.yaml
+6
-0
__init__.py
test_backend_data/hospitals_v2_data/__init__.py
+0
-0
services.yaml
test_backend_data/hospitals_v2_data/services.yaml
+32
-0
__init__.py
test_backend_data/im_data/__init__.py
+0
-0
auto_msg.yaml
test_backend_data/im_data/auto_msg.yaml
+10
-0
conversation_detail.yaml
test_backend_data/im_data/conversation_detail.yaml
+10
-0
__init__.py
test_backend_data/live_data/__init__.py
+0
-0
danmu_v2.yaml
test_backend_data/live_data/danmu_v2.yaml
+18
-0
pushlive_info.yaml
test_backend_data/live_data/pushlive_info.yaml
+46
-0
my_conversation.yaml
test_backend_data/my_conversation_data/my_conversation.yaml
+9
-0
__init__.py
test_backend_data/notification_data/__init__.py
+0
-0
unread.yaml
test_backend_data/notification_data/unread.yaml
+8
-0
__init__.py
test_backend_data/oneimage_data/__init__.py
+0
-0
recomend_services.yaml
test_backend_data/oneimage_data/recomend_services.yaml
+8
-0
share_v4.yaml
test_backend_data/oneimage_data/share_v4.yaml
+8
-0
__init__.py
test_backend_data/user_data/__init__.py
+0
-0
answer.yaml
test_backend_data/user_data/answer.yaml
+6
-0
No files found.
.DS_Store
View file @
97c8e6db
No preview for this file type
all_backend_api/conversation_request.py
0 → 100644
View file @
97c8e6db
import
path_setting
from
in_common.base_request
import
BaseRequest
class
conversation_request
(
BaseRequest
):
def
__init__
(
self
):
self
.
messageread
=
self
.
api_load
(
path_setting
.
MESSAGE_READ_CONFIG
)
def
message_read
(
self
,
current_city_id
,
release
,
message_ids
):
self
.
params
[
"current_city_id"
]
=
current_city_id
self
.
params
[
"release"
]
=
release
#self.params["uqid"] = uqid
self
.
params
[
"message_ids"
]
=
message_ids
return
self
.
api_send
(
self
.
messageread
[
"message_read"
])
if
__name__
==
'__main__'
:
print
(
conversation_request
()
.
message_read
(
"beijing"
,
1
,
'[10622,10626,10646,10651]'
))
all_backend_api/conversation_request.yaml
0 → 100644
View file @
97c8e6db
message_read
:
method
:
post
url
:
/api/conversation/message/read
params
:
current_city_id
:
${current_city_id}
release
:
${release}
#uqid: ${uqid}
data
:
message_ids
:
${message_ids}
json
:
{}
isLogin
:
1
#需要登录的接口
\ No newline at end of file
all_backend_api/doctor_request.py
0 → 100644
View file @
97c8e6db
import
path_setting
from
in_common.base_request
import
BaseRequest
class
doctor_request
(
BaseRequest
):
def
__init__
(
self
):
self
.
data
=
self
.
api_load
(
path_setting
.
DOCTOR_ARTICLE_CONFIG
)
#医生/医院主页-医生说/医院说列表
def
article
(
self
,
doctor_id
):
self
.
params
[
"doctor_id"
]
=
doctor_id
return
self
.
api_send
(
self
.
data
[
"article"
])
if
__name__
==
'__main__'
:
#打印医生/医院主页-医生说/医院说列表接口返回
print
(
doctor_request
()
.
article
(
"9918ad7eb8f511e58f8200163e000a4a"
))
\ No newline at end of file
all_backend_api/doctor_request.yaml
0 → 100644
View file @
97c8e6db
#医生/医院主页——医生说/医院说
article
:
method
:
get
url
:
/api/doctor/article
params
:
doctor_id
:
${doctor_id}
count
:
10
page
:
1
own_page
:
0
doctor_type
:
0
data
:
{}
json
:
{}
\ No newline at end of file
all_backend_api/hospital_request.py
0 → 100644
View file @
97c8e6db
import
path_setting
from
in_common.base_request
import
BaseRequest
class
hospital_request
(
BaseRequest
):
def
__init__
(
self
):
self
.
data
=
self
.
api_load
(
path_setting
.
HOSPITAL_DIARY_CONFIG
)
#医院主页日记列表
def
diary
(
self
,
hospital
):
self
.
params
[
"hospital"
]
=
hospital
return
self
.
api_send
(
self
.
data
[
"diary"
])
if
__name__
==
'__main__'
:
#打印医院主页日记列表接口返回
print
(
hospital_request
()
.
diary
(
"bjxyjcpfbyy"
))
\ No newline at end of file
all_backend_api/hospital_request.yaml
0 → 100644
View file @
97c8e6db
#医院主页日记列表
diary
:
method
:
get
url
:
/api/hospital/diary
params
:
hospital
:
${hospital}
count
:
4
page
:
1
own_page
:
0
tag_id
:
data
:
{}
json
:
{}
\ No newline at end of file
all_backend_api/hospitals_request.yaml
View file @
97c8e6db
#详情
#
医院主页
详情
detail
:
detail
:
method
:
get
method
:
get
url
:
/api/hospitals/bjxyjcpfbyy/detail
url
:
/api/hospitals/bjxyjcpfbyy/detail
...
@@ -6,7 +6,7 @@ detail:
...
@@ -6,7 +6,7 @@ detail:
data
:
{}
data
:
{}
json
:
{}
json
:
{}
#医生列表
#医
院主页医
生列表
doctor
:
doctor
:
method
:
get
method
:
get
url
:
/api/hospitals/bjxyjcpfbyy/doctors
url
:
/api/hospitals/bjxyjcpfbyy/doctors
...
...
all_backend_api/hospitals_v2_request.py
0 → 100644
View file @
97c8e6db
import
path_setting
from
in_common.base_request
import
BaseRequest
class
hospitals_v2_request
(
BaseRequest
):
def
__init__
(
self
):
self
.
data
=
self
.
api_load
(
path_setting
.
HOSPITAL_SERVICE_CONFIG
)
#医院主页商品列表
def
services
(
self
):
return
self
.
api_send
(
self
.
data
[
"services"
])
if
__name__
==
'__main__'
:
#打印医院主页商品列表接口返回
print
(
hospitals_v2_request
()
.
services
())
\ No newline at end of file
all_backend_api/hospitals_v2_request.yaml
0 → 100644
View file @
97c8e6db
#医院主页商品列表
services
:
method
:
get
url
:
/api/hospitals_v2/bjxyjcpfbyy/services
params
:
offset
:
0
show_tag_distro
:
1
tag_id
:
"
all"
size
:
10
data
:
{}
json
:
{}
\ No newline at end of file
all_backend_api/im_request.py
0 → 100644
View file @
97c8e6db
import
path_setting
from
in_common.base_request
import
BaseRequest
class
im_request
(
BaseRequest
):
def
__init__
(
self
):
self
.
data
=
self
.
api_load
(
path_setting
.
CONVERSATION_DETAIL_CONFIG
)
def
conversation_detail
(
self
,
current_city_id
,
begin_msg_id
,
conversation_type
,
end_msg_id
,
referrer
):
self
.
params
[
"current_city_id"
]
=
current_city_id
self
.
params
[
"begin_msg_id"
]
=
begin_msg_id
self
.
params
[
"conversation_type"
]
=
conversation_type
self
.
params
[
"end_msg_id"
]
=
end_msg_id
self
.
params
[
"referrer"
]
=
referrer
return
self
.
api_send
(
self
.
data
[
"conversation_detail"
])
def
auto_msg
(
self
,
version
,
uqid
,
trace_id
,
conversation_id
):
self
.
params
[
"version"
]
=
version
self
.
params
[
"uqid"
]
=
uqid
self
.
params
[
"trace_id"
]
=
trace_id
self
.
params
[
"conversation_id"
]
=
conversation_id
return
self
.
api_send
(
self
.
data
[
"auto_msg"
])
if
__name__
==
'__main__'
:
print
(
im_request
()
.
conversation_detail
(
"beijing"
,
0
,
4
,
0
,
"message_home"
))
print
(
"第二个接口"
)
print
(
im_request
()
.
auto_msg
(
"7.42.2"
,
"1B519701-A4F5-453E-9D99-140B5AF697A0"
,
"2021/04/22/1722/70a1791606d5"
,
368
))
all_backend_api/im_request.yaml
0 → 100644
View file @
97c8e6db
conversation_detail
:
method
:
get
url
:
/api/im/conversation/detail
params
:
current_city_id
:
${current_city_id}
begin_msg_id
:
${begin_msg_id}
conversation_type
:
${conversation_type}
end_msg_id
:
${begin_msg_id}
referrer
:
${referrer}
data
:
{}
json
:
{}
isLogin
:
1
#需要登录的接口
auto_msg
:
method
:
post
url
:
/api/im/auto_msg
params
:
version
:
${version}
trace_id
:
${trace_id}
uqidd
:
${uqid}
data
:
conversation_id
:
${conversation_id}
json
:
{}
isLogin
:
1
#需要登录的接口
\ No newline at end of file
all_backend_api/live_request.py
0 → 100644
View file @
97c8e6db
import
path_setting
from
in_common.base_request
import
BaseRequest
class
living_request
(
BaseRequest
):
def
__init__
(
self
):
self
.
data
=
self
.
api_load
(
path_setting
.
LIVEYAML_CONFIG
)
#获取弹幕
def
danmu_v2
(
self
,
channel_id
,
msg_id
,
user_id
=
""
):
self
.
params
[
"channel_id"
]
=
channel_id
self
.
params
[
"msg_id"
]
=
msg_id
self
.
params
[
"user_id"
]
=
user_id
return
self
.
api_send
(
self
.
data
[
"danmu_v2"
])
#主播开播
def
pushlive_info
(
self
,
title
,
cover_url
,
notice
,
tag_id
,
clarity
,
device_type
):
self
.
params
[
"title"
]
=
title
self
.
params
[
"cover_url"
]
=
cover_url
self
.
params
[
"notice"
]
=
notice
self
.
params
[
"tag_id"
]
=
tag_id
self
.
params
[
"clarity"
]
=
clarity
self
.
params
[
"device_type"
]
=
device_type
return
self
.
api_send
(
self
.
data
[
"pushlive_info"
])
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
all_backend_api/live_request.yaml
0 → 100644
View file @
97c8e6db
#获取弹幕
danmu_v2
:
method
:
get
url
:
/api/live/danmu_v2
params
:
channel_id
:
${channel_id}
msg_id
:
${msg_id}
user_id
:
${user_id}
data
:
{}
json
:
{}
#主播开播
pushlive_info
:
method
:
get
url
:
/api/live/push_live_info
params
:
title
:
${title}
cover_url
:
${cover_url}
notice
:
${notice}
tag_id
:
${tag_id}
clarity
:
${clarity}
device_type
:
${device_type}
data
:
{}
json
:
{}
isLogin
:
1
all_backend_api/my_conversation_request.py
View file @
97c8e6db
import
path_setting
from
in_common.base_request
import
BaseRequest
class
my_conversation_request
(
BaseRequest
):
def
__init__
(
self
):
self
.
data
=
self
.
api_load
(
path_setting
.
MY_CONVERSATION_CONFIG
)
def
my_conversation
(
self
,
current_city_id
,
start_num
,
count
,):
self
.
params
[
"current_city_id"
]
=
current_city_id
self
.
params
[
"start_num"
]
=
start_num
self
.
params
[
"count"
]
=
count
return
self
.
api_send
(
self
.
data
[
"my_conversation"
])
if
__name__
==
'__main__'
:
print
(
my_conversation_request
()
.
my_conversation
(
"beijing"
,
"0"
,
10
))
\ No newline at end of file
all_backend_api/my_conversation_request.yaml
View file @
97c8e6db
my_conversation
:
method
:
get
url
:
/api/my_conversation/
params
:
current_city_id
:
${current_city_id}
start_num
:
${start_num}
count
:
10
data
:
{}
json
:
{}
isLogin
:
1
#需要登录的接口
\ No newline at end of file
all_backend_api/notification_request.py
0 → 100644
View file @
97c8e6db
import
path_setting
from
in_common.base_request
import
BaseRequest
class
notification_request
(
BaseRequest
):
def
__init__
(
self
):
self
.
data
=
self
.
api_load
(
path_setting
.
UNREAD_CONFIG
)
def
unread
(
self
,
uqid
,
trace_id
,):
self
.
params
[
"uqid"
]
=
uqid
self
.
params
[
"trace_id"
]
=
trace_id
return
self
.
api_send
(
self
.
data
[
"unread"
])
if
__name__
==
'__main__'
:
print
(
notification_request
()
.
unread
(
"1B519701-A4F5-453E-9D99-140B5AF697A0"
,
"2021/04/22/1722/46cf97b999b0"
))
all_backend_api/notification_request.yaml
0 → 100644
View file @
97c8e6db
unread
:
method
:
get
url
:
/api/notification/unread
params
:
uqid
:
${uqid}
trace_id
:
${trace_id}
data
:
{}
json
:
{}
isLogin
:
1
#需要登录的接口
all_backend_api/oneimage_request.py
0 → 100644
View file @
97c8e6db
import
path_setting
from
in_common.base_request
import
BaseRequest
class
oneimage_request
(
BaseRequest
):
def
__init__
(
self
):
self
.
data
=
self
.
api_load
(
path_setting
.
ONEIMAGE_SHARE_V4_CONFIG
)
# 测颜值结果页
def
share_v4
(
self
,
version
,
face_id
):
self
.
params
[
"version"
]
=
version
self
.
params
[
"face_id"
]
=
face_id
return
self
.
api_send
(
self
.
data
[
"share_v4"
])
# 测颜值结果页,根据五官推荐美购接口
def
recomend_services
(
self
,
version
,
business_tags_names
):
self
.
params
[
"version"
]
=
version
self
.
params
[
"business_tags_names"
]
=
business_tags_names
return
self
.
api_send
(
self
.
data
[
"recomend_services"
])
if
__name__
==
'__main__'
:
print
(
oneimage_request
()
.
share_v4
(
"7.42.2"
,
"27320150"
))
business_tags_names
=
'[[],[],["玻尿酸垫下巴","自体脂肪垫下巴","硅胶垫下巴","膨体垫下巴"],["半永久纹眉","植眉"],["玻尿酸丰唇","胶原蛋白填充丰唇","自体脂肪丰唇"],[],["开内眼角"],["射频提升","热拉提","热拉提plus","热玛吉","超声提升"],["热玛吉"],[],["注射瘦脸","激光溶脂瘦脸","取颊脂垫瘦脸","光纤溶脂瘦脸","下颌角整形"]]'
print
(
oneimage_request
()
.
recomend_services
(
"7.42.2"
,
business_tags_names
))
\ No newline at end of file
all_backend_api/oneimage_request.yaml
0 → 100644
View file @
97c8e6db
#测肤结果页
share_v4
:
method
:
post
url
:
/api/one_image/share/v4
params
:
version
:
${version}
data
:
face_id
:
${face_id}
json
:
{}
#测肤结果根据五官推荐美购
recomend_services
:
method
:
get
url
:
/api/one_image/recomend/services
params
:
version
:
${version}
business_tags_names
:
${business_tags_names}
json
:
{}
all_backend_api/user_request.py
0 → 100644
View file @
97c8e6db
import
path_setting
from
in_common.base_request
import
BaseRequest
class
user_request
(
BaseRequest
):
def
__init__
(
self
):
self
.
data
=
self
.
api_load
(
path_setting
.
USER_ANSWER_CONFIG
)
#医院主页问答列表
def
answer
(
self
,
user
):
self
.
params
[
"user"
]
=
user
return
self
.
api_send
(
self
.
data
[
"answer"
])
if
__name__
==
'__main__'
:
#打印医生/医院主页问答列表接口返回
print
(
user_request
()
.
answer
(
"21476198"
))
\ No newline at end of file
all_backend_api/user_request.yaml
0 → 100644
View file @
97c8e6db
#医院主页-问答接口
answer
:
method
:
get
url
:
/api/user/answer
params
:
user
:
${user}
count
:
10
page
:
1
data
:
{}
json
:
{}
\ No newline at end of file
host.yaml
View file @
97c8e6db
develop_host
:
develop_host
:
#
backend: http://backend.paas-develop.env
backend
:
http://backend.paas-develop.env
doctor
:
http://doctor.paas-develop.env
#
doctor: http://doctor.paas-develop.env
in_common/base_request.py
View file @
97c8e6db
...
@@ -80,13 +80,18 @@ class BaseRequest:
...
@@ -80,13 +80,18 @@ class BaseRequest:
s
=
LoginFunction
()
.
get_session
()
s
=
LoginFunction
()
.
get_session
()
# 调用具体case的url
# 调用具体case的url
print
(
req
[
'method'
])
print
(
url_host
+
req
[
'url'
])
print
(
req
.
get
(
'params'
))
print
(
req
.
get
(
'data'
))
r
=
s
.
request
(
r
=
s
.
request
(
req
[
'method'
],
req
[
'method'
],
url
=
url_host
+
req
[
'url'
],
url
=
url_host
+
req
[
'url'
],
params
=
req
.
get
(
'params'
),
params
=
req
.
get
(
'params'
),
# headers=user_headers,
# headers=user_headers,
data
=
req
.
get
(
'data'
),
data
=
req
.
get
(
'data'
),
json
=
req
.
get
(
'json'
)
json
=
req
.
get
(
'json'
),
# proxies={"http":"172.30.9.226:8888"}
)
)
return
r
.
json
()
return
r
.
json
()
...
...
path_setting.py
View file @
97c8e6db
...
@@ -8,10 +8,21 @@ LOGIN_FUNCTION_DATA = os.path.join(BASE_DIR, "backend_auto", "login_session_func
...
@@ -8,10 +8,21 @@ LOGIN_FUNCTION_DATA = os.path.join(BASE_DIR, "backend_auto", "login_session_func
APYAML_CONFIG
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/all_backend_api"
,
"account_request.yaml"
)
APYAML_CONFIG
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/all_backend_api"
,
"account_request.yaml"
)
LOGIN_VFC
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_backend_data/account_data"
,
"login_vfc.yaml"
)
LOGIN_VFC
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_backend_data/account_data"
,
"login_vfc.yaml"
)
DIARY_DATA_CONFIG
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/all_backend_api"
,
"diary_data_request.yaml"
)
DIARY_DATA_CONFIG
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/all_backend_api"
,
"diary_data_request.yaml"
)
DIARY_DATA
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_backend_data/account_data"
,
"diary_data.yaml"
)
DIARY_DATA
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_backend_data/account_data"
,
"diary_data.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"
)
SERVICE_DATA
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_doctor_data/web2_data"
,
"service_list.yaml"
)
SERVICE_URL
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/all_doctor_api"
,
"web2_request.yaml"
)
#搜索首页-热门搜索
#搜索首页-热门搜索
KEYWORDS_CONFIG
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/all_backend_api"
,
"search_request.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"
)
KEYWORDS
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_backend_data/search_data"
,
"keywords.yaml"
)
...
@@ -20,9 +31,25 @@ SERVICE_DATA=os.path.join(BASE_DIR, "backend_auto/test_doctor_data/web2_data", "
...
@@ -20,9 +31,25 @@ SERVICE_DATA=os.path.join(BASE_DIR, "backend_auto/test_doctor_data/web2_data", "
SERVICE_URL
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/all_doctor_api"
,
"web2_request.yaml"
)
SERVICE_URL
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/all_doctor_api"
,
"web2_request.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"
)
SERVICE_DATA
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_doctor_data/web2_data"
,
"service_list.yaml"
)
SERVICE_URL
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/all_doctor_api"
,
"web2_request.yaml"
)
# 首页灰度v9,精选tab
FEED_INDEXV9_CONFIG
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/all_backend_api"
,
"feed_request.yaml"
)
FEED_INDEXV9_CONFIG
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/all_backend_api"
,
"feed_request.yaml"
)
FEED_INDEXV9_DATA
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_backend_data/feed_data"
,
"index_v9.yaml"
)
FEED_INDEXV9_DATA
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_backend_data/feed_data"
,
"index_v9.yaml"
)
# 测颜值结果页
ONEIMAGE_SHARE_V4_CONFIG
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/all_backend_api"
,
"oneimage_request.yaml"
)
ONEIMAGE_SHARE_V4_DATA
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_backend_data/oneimage_data"
,
"share_v4.yaml"
)
# 测颜值根据五官推荐美购
ONEIMAGE_RECOMEND_SERVICES_DATA
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_backend_data/oneimage_data"
,
"recomend_services.yaml"
)
LOGIN_PASSWD
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_backend_data/accounts_data"
,
"login_passwd.yaml"
)
LOGIN_PASSWD
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_backend_data/accounts_data"
,
"login_passwd.yaml"
)
LOGIN_CONFIG
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/all_backend_api"
,
"accounts_request.yaml"
)
LOGIN_CONFIG
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/all_backend_api"
,
"accounts_request.yaml"
)
...
@@ -31,11 +58,27 @@ HDYAML_CONFIG = os.path.join(BASE_DIR, "backend_auto/all_backend_api", "hospital
...
@@ -31,11 +58,27 @@ HDYAML_CONFIG = os.path.join(BASE_DIR, "backend_auto/all_backend_api", "hospital
HOSPITAL_DETAIL
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_backend_data/hospitals_data"
,
"detail.yaml"
)
HOSPITAL_DETAIL
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_backend_data/hospitals_data"
,
"detail.yaml"
)
#医院主页医生列表
#医院主页医生列表
HOSPITAL_DOCTOR
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_backend_data/hospitals_data"
,
"doctor.yaml"
)
HOSPITAL_DOCTOR
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_backend_data/hospitals_data"
,
"doctor.yaml"
)
#医院主页商品列表
HOSPITAL_SERVICE_CONFIG
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/all_backend_api"
,
"hospitals_v2_request.yaml"
)
HOSPITAL_SERVICE
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_backend_data/hospitals_v2_data"
,
"services.yaml"
)
#医院主页日记列表
HOSPITAL_DIARY_CONFIG
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/all_backend_api"
,
"hospital_request.yaml"
)
HOSPITAL_DIARY
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_backend_data/hospital_data"
,
"diary.yaml"
)
#医生/医院主页-医生/医院说列表
DOCTOR_ARTICLE_CONFIG
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/all_backend_api"
,
"doctor_request.yaml"
)
DOCTOR_ARTICLE
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_backend_data/doctor_data"
,
"article.yaml"
)
#医生/医院主页-问答列表
USER_ANSWER_CONFIG
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/all_backend_api"
,
"user_request.yaml"
)
USER_ANSWER
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_backend_data/user_data"
,
"answer.yaml"
)
#消息列表
MY_CONVERSATION_CONFIG
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/all_backend_api"
,
"my_conversation_request.yaml"
)
MY_CONVERSATION
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_backend_data/my_conversation_data"
,
"my_conversation.yaml"
)
HOME_V5_CONFIG
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/all_backend_api"
,
"service_request.yaml"
)
HOME_V5_CONFIG
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/all_backend_api"
,
"service_request.yaml"
)
HOME_V5
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_backend_data/service_data"
,
"home_v5.yaml"
)
HOME_V5
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_backend_data/service_data"
,
"home_v5.yaml"
)
#搜索结果页-综合/百科
#搜索结果页-综合/百科
CONTENTV7_CONFIG
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/all_backend_api"
,
"janus_request.yaml"
)
CONTENTV7_CONFIG
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/all_backend_api"
,
"janus_request.yaml"
)
CONTENTV7
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_backend_data/janus_data"
,
"content_v7.yaml"
)
CONTENTV7
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_backend_data/janus_data"
,
"content_v7.yaml"
)
...
@@ -44,5 +87,26 @@ CONTENTV7 = os.path.join(BASE_DIR, "backend_auto/test_backend_data/janus_data",
...
@@ -44,5 +87,26 @@ CONTENTV7 = os.path.join(BASE_DIR, "backend_auto/test_backend_data/janus_data",
HOSPITALSEARCH_CONFIG
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/all_backend_api"
,
"janus_request.yaml"
)
HOSPITALSEARCH_CONFIG
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/all_backend_api"
,
"janus_request.yaml"
)
HOSPITALSEARCH
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_backend_data/janus_data"
,
"hospital_search.yaml"
)
HOSPITALSEARCH
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_backend_data/janus_data"
,
"hospital_search.yaml"
)
#直播
LIVEYAML_CONFIG
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/all_backend_api"
,
"live_request.yaml"
)
#直播-获取弹幕
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"
)
#消息
MESSAGE_READ_CONFIG
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/all_backend_api"
,
"conversation_request.yaml"
)
MESSAGE_READ
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_backend_data/conversation_data"
,
"message_read.yaml"
)
#咨询顾问
CONVERSATION_DETAIL_CONFIG
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/all_backend_api"
,
"im_request.yaml"
)
CONVERSATION_DETAIL
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_backend_data/im_data"
,
"conversation_detail.yaml"
)
AUTO_MSG
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_backend_data/im_data"
,
"auto_msg.yaml"
)
#消息页未读数
UNREAD_CONFIG
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/all_backend_api"
,
"notification_request.yaml"
)
UNREAD
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_backend_data/notification_data"
,
"unread.yaml"
)
if
__name__
==
'__main__'
:
if
__name__
==
'__main__'
:
print
(
"=========="
,
HOST
YAML_CONFIG
)
print
(
"=========="
,
LIVE
YAML_CONFIG
)
test_backend_case/conversation_case/__init__.py
0 → 100644
View file @
97c8e6db
test_backend_case/conversation_case/test_message_read.py
0 → 100644
View file @
97c8e6db
import
pytest
from
ids_list
import
get_ids
import
path_setting
from
in_common.base_request
import
BaseRequest
from
all_backend_api.conversation_request
import
conversation_request
class
TestMessageRead
:
data
=
BaseRequest
()
.
api_load
(
path_setting
.
MESSAGE_READ
)
#conversation_case, conversation_data = get_ids(data, "message_read")
messageread_case
,
messageread_data
=
get_ids
(
data
,
"message_read"
)
@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"
])
if
r
[
"error"
]
==
0
:
assert
r
[
"data"
][
"success"
]
==
param
[
"assert"
]
#if r["error"] == 0:
# success = r.get("data").get("success", "")
test_backend_case/doctor_case/__init__.py
0 → 100644
View file @
97c8e6db
test_backend_case/doctor_case/test_article.py
0 → 100644
View file @
97c8e6db
import
pytest
from
all_backend_api.doctor_request
import
doctor_request
from
ids_list
import
get_ids
import
path_setting
from
in_common.base_request
import
BaseRequest
class
TestArticle
:
data
=
BaseRequest
()
.
api_load
(
path_setting
.
DOCTOR_ARTICLE
)
article_case
,
article_data
=
get_ids
(
data
,
"article"
)
@pytest.mark.parametrize
(
"param"
,
article_data
,
ids
=
article_case
)
def
test_article
(
self
,
param
):
r
=
doctor_request
()
.
article
(
param
[
"doctor_id"
])
if
r
[
"error"
]
==
0
:
assert
r
[
"error"
]
==
param
[
"assert_error"
]
test_backend_case/hospital_case/__init__.py
0 → 100644
View file @
97c8e6db
test_backend_case/hospital_case/test_diary.py
0 → 100644
View file @
97c8e6db
import
pytest
from
all_backend_api.hospital_request
import
hospital_request
from
ids_list
import
get_ids
import
path_setting
from
in_common.base_request
import
BaseRequest
class
TestDiary
:
data
=
BaseRequest
()
.
api_load
(
path_setting
.
HOSPITAL_DIARY
)
diary_case
,
diary_data
=
get_ids
(
data
,
"diary"
)
@pytest.mark.parametrize
(
"param"
,
diary_data
,
ids
=
diary_case
)
def
test_diary
(
self
,
param
):
r
=
hospital_request
()
.
diary
(
param
[
"hospital"
])
if
r
[
"error"
]
==
0
:
assert
r
[
"error"
]
==
param
[
"assert_error"
]
test_backend_case/hospitals_v2_case/__init__.py
0 → 100644
View file @
97c8e6db
test_backend_case/hospitals_v2_case/test_services.py
0 → 100644
View file @
97c8e6db
import
pytest
from
all_backend_api.hospitals_v2_request
import
hospitals_v2_request
from
ids_list
import
get_ids
import
path_setting
from
in_common.base_request
import
BaseRequest
class
TestServices
:
data
=
BaseRequest
()
.
api_load
(
path_setting
.
HOSPITAL_SERVICE
)
services_case
,
services_data
=
get_ids
(
data
,
"services"
)
@pytest.mark.parametrize
(
"param"
,
services_data
,
ids
=
services_case
)
def
test_detail
(
self
,
param
):
r
=
hospitals_v2_request
()
.
services
()
if
r
[
"error"
]
==
0
:
assert
r
[
"error"
]
==
param
[
"assert_error"
]
assert
r
[
"data"
][
"services"
][
0
][
"service_item_id"
]
==
param
[
"assert_sku"
]
assert
r
[
"data"
][
"services"
][
0
][
"service_id"
]
==
param
[
"assert_spu"
]
assert
r
[
"data"
][
"services"
][
0
][
"price_info"
][
"has_discount"
]
==
param
[
"assert_discount"
]
assert
r
[
"data"
][
"services"
][
0
][
"sales_info"
][
0
][
"type"
]
==
param
[
"assert_sales"
]
assert
r
[
"data"
][
"services"
][
0
][
"exposure"
][
"card_type"
]
==
param
[
"assert_card_type"
]
assert
r
[
"data"
][
"services"
][
0
][
"title"
]
==
param
[
"assert_title"
]
assert
r
[
"data"
][
"tag_distribution"
][
0
][
"selected"
]
==
param
[
"assert_tagselected"
]
test_backend_case/im_case/__init__.py
0 → 100644
View file @
97c8e6db
test_backend_case/im_case/test_auto_msg.py
0 → 100644
View file @
97c8e6db
import
pytest
from
ids_list
import
get_ids
import
path_setting
from
in_common.base_request
import
BaseRequest
from
all_backend_api.im_request
import
im_request
class
TestConversationDetail
:
data
=
BaseRequest
()
.
api_load
(
path_setting
.
AUTO_MSG
)
automsg_case
,
automsg_data
=
get_ids
(
data
,
"auto_msg"
)
@pytest.mark.parametrize
(
"param"
,
automsg_data
,
ids
=
automsg_case
)
def
test_conversation_detail
(
self
,
param
):
r
=
im_request
()
.
auto_msg
(
param
[
"version"
],
param
[
"uqid"
],
param
[
"trace_id"
],
param
[
"conversation_id"
])
if
r
[
"error"
]
==
0
:
assert
r
[
"data"
][
"send_result"
]
==
param
[
"assert"
]
test_backend_case/im_case/test_conversation_detail.py
0 → 100644
View file @
97c8e6db
import
pytest
from
ids_list
import
get_ids
import
path_setting
from
in_common.base_request
import
BaseRequest
from
all_backend_api.im_request
import
im_request
class
TestConversationDetail
:
data
=
BaseRequest
()
.
api_load
(
path_setting
.
CONVERSATION_DETAIL
)
conversationdetail_case
,
conversationdetail_data
=
get_ids
(
data
,
"conversation_detail"
)
@pytest.mark.parametrize
(
"param"
,
conversationdetail_data
,
ids
=
conversationdetail_case
)
def
test_conversation_detail
(
self
,
param
):
r
=
im_request
()
.
conversation_detail
(
param
[
"current_city_id"
],
param
[
"begin_msg_id"
],
param
[
"conversation_type"
],
param
[
"end_msg_id"
],
param
[
"referrer"
])
if
r
[
"error"
]
==
0
:
msg_list
=
r
.
get
(
"data"
)
.
get
(
"msg_list"
,[])
assert
len
(
msg_list
)
>
param
[
"assert"
]
test_backend_case/live_case/__init__.py
0 → 100644
View file @
97c8e6db
test_backend_case/live_case/test_danmu_v2.py
0 → 100644
View file @
97c8e6db
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
TestDanmuV2
:
data
=
BaseRequest
()
.
api_load
(
path_setting
.
DANMU_V2
)
danmuv2_case
,
danmuv2_data
=
get_ids
(
data
,
"danmu_v2"
)
@pytest.mark.parametrize
(
"param"
,
danmuv2_data
,
ids
=
danmuv2_case
)
def
test_danmu_v2
(
self
,
param
):
print
(
param
)
r
=
living_request
()
.
danmu_v2
(
param
[
"channel_id"
],
param
[
"msg_id"
],
param
[
"user_id"
])
if
r
[
"error"
]
==
0
:
assert
r
[
"error"
]
==
param
[
"assert"
]
else
:
assert
r
[
"message"
]
==
param
[
"assert_message"
]
\ No newline at end of file
test_backend_case/live_case/test_pushlive_info.py
0 → 100644
View file @
97c8e6db
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
TestPushLiveInfo
:
data
=
BaseRequest
()
.
api_load
(
path_setting
.
PUSH_LIVE_INFO
)
pushliveinfo_case
,
pushliveinfo_data
=
get_ids
(
data
,
"push_live_info"
)
@pytest.mark.parametrize
(
"param"
,
pushliveinfo_data
,
ids
=
pushliveinfo_case
)
def
test_pushlive_info
(
self
,
param
):
r
=
living_request
()
.
pushlive_info
(
param
[
"title"
],
param
[
"cover_url"
],
param
[
"notice"
],
param
[
"tag_id"
],
param
[
"clarity"
],
param
[
"device_type"
])
print
(
'--------'
,
r
)
if
r
[
"error"
]
==
0
:
assert
r
[
"error"
]
==
param
[
"assert"
]
else
:
assert
r
[
"message"
]
==
param
[
'assert_message0'
]
\ No newline at end of file
test_backend_case/my_conversation_case/test_my_conversation.py
0 → 100644
View file @
97c8e6db
import
pytest
from
ids_list
import
get_ids
import
path_setting
from
in_common.base_request
import
BaseRequest
from
all_backend_api.my_conversation_request
import
my_conversation_request
class
TestMyConversation
:
data
=
BaseRequest
()
.
api_load
(
path_setting
.
MY_CONVERSATION
)
my_conversation_case
,
my_conversation_data
=
get_ids
(
data
,
"my_conversation"
)
@pytest.mark.parametrize
(
"param"
,
my_conversation_data
,
ids
=
my_conversation_case
)
def
test_my_conversation
(
self
,
param
):
'''私信列表'''
r
=
my_conversation_request
()
.
my_conversation
(
param
[
"current_city_id"
],
param
[
"start_num"
],
param
[
"count"
])
if
r
[
"error"
]
==
0
:
conversation_list
=
r
.
get
(
"data"
)
.
get
(
"conversation_list"
,
[])
assert
len
(
conversation_list
)
<=
param
[
"assert"
]
test_backend_case/notification_case/__init__.py
0 → 100644
View file @
97c8e6db
test_backend_case/notification_case/test_unread.py
0 → 100644
View file @
97c8e6db
import
pytest
from
ids_list
import
get_ids
import
path_setting
from
in_common.base_request
import
BaseRequest
from
all_backend_api.notification_request
import
notification_request
class
TestUnread
:
data
=
BaseRequest
()
.
api_load
(
path_setting
.
UNREAD
)
unread_case
,
unread_data
=
get_ids
(
data
,
"unread"
)
@pytest.mark.parametrize
(
"param"
,
unread_data
,
ids
=
unread_case
)
def
test_unread
(
self
,
param
):
r
=
notification_request
()
.
unread
(
param
[
"uqid"
],
param
[
"trace_id"
])
#print("返回结果是:%s" % r)
total_count
=
r
[
"data"
][
"unread_count"
][
"total_count"
]
print
(
"总数量是:
%
s"
%
total_count
)
total_unread
=
r
.
get
(
"data"
)
.
get
(
"unread_count"
)
.
get
(
"follow_count"
)
.
get
(
"total_unread"
)
#关注总未读数
#print("总数量1是:%s" % total_unread)
message_count
=
r
[
"data"
][
"unread_count"
][
"message_count"
]
#私信列表总未读数
#print("私信列表总未读数是:%s" % message_count)
vote_favor
=
r
[
"data"
][
"unread_count"
][
"vote_favor_count"
][
"vote_favor"
]
#赞/收藏总未读数
#print("赞/收藏总未读数是:%s" % vote_favor)
reply_count
=
r
[
"data"
][
"unread_count"
][
"reply_count"
]
#回复总未读数
#print("回复总未读数是:%s" % reply_count)
count
=
total_unread
+
message_count
+
vote_favor
+
reply_count
#print("相加总数是是:%s" % count)
if
r
[
"error"
]
==
0
:
assert
r
[
"data"
][
"unread_count"
][
"total_count"
]
>=
param
[
"assert"
]
assert
r
[
"data"
][
"unread_count"
][
"total_count"
]
==
count
test_backend_case/oneimage_case/__init__.py
0 → 100644
View file @
97c8e6db
test_backend_case/oneimage_case/test_recomend_services.py
0 → 100644
View file @
97c8e6db
import
pytest
from
ids_list
import
get_ids
import
path_setting
from
in_common.base_request
import
BaseRequest
from
all_backend_api.oneimage_request
import
oneimage_request
# 测颜值根据五官推荐美购
class
TestRecomendServices
:
data
=
BaseRequest
()
.
api_load
(
path_setting
.
ONEIMAGE_RECOMEND_SERVICES_DATA
)
recomendservice_case
,
recomendservice_data
=
get_ids
(
data
,
"recomend_services"
)
# @pytest.mark.skip("跳过测颜值根据五官推荐美购,目前数据是参数是线上的-------------------")
@pytest.mark.parametrize
(
"param"
,
recomendservice_data
,
ids
=
recomendservice_case
)
def
test_recomend_services
(
self
,
param
):
r
=
oneimage_request
()
.
recomend_services
(
param
[
"version"
],
param
[
"business_tags_names"
])
if
r
[
"error"
]
==
0
:
data
=
r
.
get
(
"data"
)
assert
len
(
data
)
==
param
[
"assert"
]
gm_url
=
data
[
0
]
.
get
(
"gm_url"
)
assert
gm_url
.
startswith
(
"gengmei://search_result?searchTabType=0"
)
==
True
,
f
'返回并非搜索协议,实际是{gm_url}'
assert
len
(
data
[
0
]
.
get
(
"service"
))
>
0
,
f
'根据五官返回美购个数有误,实际是{len(data[0].get("service"))}'
test_backend_case/oneimage_case/test_share_v4.py
0 → 100644
View file @
97c8e6db
import
pytest
from
ids_list
import
get_ids
import
path_setting
from
in_common.base_request
import
BaseRequest
from
all_backend_api.oneimage_request
import
oneimage_request
class
TestShareV4
:
"""
测颜值结果页,分享结果
"""
data
=
BaseRequest
()
.
api_load
(
path_setting
.
ONEIMAGE_SHARE_V4_DATA
)
sharev4_case
,
sharev4_data
=
get_ids
(
data
,
"share_v4"
)
# @pytest.mark.skip("跳过,测颜值结果v4,目前数据是线上的-------------------")
@pytest.mark.parametrize
(
"param"
,
sharev4_data
,
ids
=
sharev4_case
)
def
test_share_v4
(
self
,
param
):
r
=
oneimage_request
()
.
share_v4
(
param
[
"version"
],
param
[
"face_id"
])
assert
r
[
"error"
]
==
0
test_backend_case/user_case/__init__.py
0 → 100644
View file @
97c8e6db
test_backend_case/user_case/test_answer.py
0 → 100644
View file @
97c8e6db
import
pytest
from
all_backend_api.user_request
import
user_request
from
ids_list
import
get_ids
import
path_setting
from
in_common.base_request
import
BaseRequest
class
TestAnswer
:
data
=
BaseRequest
()
.
api_load
(
path_setting
.
USER_ANSWER
)
answer_case
,
answer_data
=
get_ids
(
data
,
"answer"
)
@pytest.mark.parametrize
(
"param"
,
answer_data
,
ids
=
answer_case
)
def
test_answer
(
self
,
param
):
r
=
user_request
()
.
answer
(
param
[
"user"
])
if
r
[
"error"
]
==
0
:
assert
r
[
"error"
]
==
param
[
"assert_error"
]
test_backend_data/conversation_data/__init__.py
0 → 100644
View file @
97c8e6db
test_backend_data/conversation_data/message_read.yaml
0 → 100644
View file @
97c8e6db
message_read
:
#验证成功case
-
case
:
"
请求成功case"
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
test_backend_data/doctor_data/__init__.py
0 → 100644
View file @
97c8e6db
test_backend_data/doctor_data/article.yaml
0 → 100644
View file @
97c8e6db
article
:
-
case
:
"
校验接口返回成功case"
doctor_id
:
"
9918ad7eb8f511e58f8200163e000a4a"
assert_error
:
0
\ No newline at end of file
test_backend_data/hospital_data/__init__.py
0 → 100644
View file @
97c8e6db
test_backend_data/hospital_data/diary.yaml
0 → 100644
View file @
97c8e6db
diary
:
-
case
:
"
校验接口返回成功case"
hospital
:
"
bjxyjcpfbyy"
assert_error
:
0
\ No newline at end of file
test_backend_data/hospitals_v2_data/__init__.py
0 → 100644
View file @
97c8e6db
test_backend_data/hospitals_v2_data/services.yaml
0 → 100644
View file @
97c8e6db
services
:
-
case
:
"
校验接口调用成功case"
assert_error
:
0
assert_sku
:
546450
assert_spu
:
5866530
assert_discount
:
True
assert_sales
:
3
assert_card_type
:
"
card"
assert_title
:
"
【G点注射】G点注射激活修复,G点玻尿酸注射唤醒
提升G点敏感度
提升塑造敏感G点
G点增厚
小阴唇整形
修复矫正"
assert_tagselected
:
true
-
case
:
"
校验商品数据case"
assert_error
:
0
assert_sku
:
546450
assert_spu
:
5866530
assert_discount
:
True
assert_sales
:
3
assert_card_type
:
"
card"
assert_title
:
"
【G点注射】G点注射激活修复,G点玻尿酸注射唤醒
提升G点敏感度
提升塑造敏感G点
G点增厚
小阴唇整形
修复矫正"
assert_tagselected
:
true
-
case
:
"
校验商品标签数据case"
assert_error
:
0
assert_sku
:
546450
assert_spu
:
5866530
assert_discount
:
True
assert_sales
:
3
assert_card_type
:
"
card"
assert_title
:
"
【G点注射】G点注射激活修复,G点玻尿酸注射唤醒
提升G点敏感度
提升塑造敏感G点
G点增厚
小阴唇整形
修复矫正"
assert_tagselected
:
true
test_backend_data/im_data/__init__.py
0 → 100644
View file @
97c8e6db
test_backend_data/im_data/auto_msg.yaml
0 → 100644
View file @
97c8e6db
auto_msg
:
#验证成功case
-
case
:
"
请求成功,有数据返回"
version
:
7.42
uqid
:
"
1B519701-A4F5-453E-9D99-140B5AF697A0"
trace_id
:
"
2021/04/22/1722/70a1791606d5"
conversation_id
:
368
assert
:
True
\ No newline at end of file
test_backend_data/im_data/conversation_detail.yaml
0 → 100644
View file @
97c8e6db
conversation_detail
:
#验证成功case
-
case
:
"
请求成功,有数据返回"
current_city_id
:
"
beijing"
begin_msg_id
:
0
conversation_type
:
4
end_msg_id
:
0
referrer
:
message_home
assert
:
0
test_backend_data/live_data/__init__.py
0 → 100644
View file @
97c8e6db
test_backend_data/live_data/danmu_v2.yaml
0 → 100644
View file @
97c8e6db
danmu_v2
:
#成功获取弹幕case
-
case
:
"
成功获取弹幕"
channel_id
:
"
739"
msg_id
:
1
user_id
:
"
"
assert
:
0
assert_message
:
"
获取弹幕失败"
#获取弹幕失败case
# -
# case: "获取弹幕失败-获取房间信息失败"
# channel_id: ""
# msg_id: 1
# user_id: ""
# assert: 0
\ No newline at end of file
test_backend_data/live_data/pushlive_info.yaml
0 → 100644
View file @
97c8e6db
push_live_info
:
#主播成功开播case
-
case
:
"
主播开播成功-未填写标签"
title
:
"
小冤家"
cover_url
:
"
2021/04/22/1003/cef471cff5e6"
notice
:
"
"
tag_id
:
"
1"
clarity
:
"
1"
device_type
:
"
1"
assert
:
0
# assert_message1 : "请登录后再试"
assert_message0
:
"
请登录后再试"
-
case
:
"
主播开播成功-填写标签"
title
:
"
小冤家"
cover_url
:
"
2021/04/22/1003/cef471cff5e6"
notice
:
"
公告"
tag_id
:
"
1"
clarity
:
"
1"
device_type
:
"
1"
assert
:
0
# assert_message1 : "请登录后再试"
assert_message0
:
"
请登录后再试"
-
case
:
"
主播开播成功-清晰度:高清开播"
title
:
"
小冤家"
cover_url
:
"
2021/04/22/1003/cef471cff5e6"
notice
:
"
公告"
tag_id
:
"
1"
clarity
:
"
2"
device_type
:
"
1"
assert
:
0
# assert_message1 : "请登录后再试"
assert_message0
:
"
请登录后再试"
-
case
:
"
主播开播成功-清晰度:超高清开播"
title
:
"
小冤家"
cover_url
:
"
2021/04/22/1003/cef471cff5e6"
notice
:
"
公告"
tag_id
:
"
1"
clarity
:
"
2"
device_type
:
"
1"
assert
:
0
# assert_message1 : "请登录后再试"
assert_message0
:
"
请登录后再试"
test_backend_data/my_conversation_data/my_conversation.yaml
0 → 100644
View file @
97c8e6db
my_conversation
:
#验证成功case
-
case
:
"
请求成功,有数据返回的第一页数据"
current_city_id
:
"
beijing"
start_num
:
0
count
:
10
assert
:
10
test_backend_data/notification_data/__init__.py
0 → 100644
View file @
97c8e6db
test_backend_data/notification_data/unread.yaml
0 → 100644
View file @
97c8e6db
unread
:
#验证成功case
-
case
:
"
请求成功,消息页各icon未读消息数等于总数"
uqid
:
"
1B519701-A4F5-453E-9D99-140B5AF697A0"
trace_id
:
"
2021/04/22/1722/46cf97b999b0"
#total_count:
assert
:
0
test_backend_data/oneimage_data/__init__.py
0 → 100644
View file @
97c8e6db
test_backend_data/oneimage_data/recomend_services.yaml
0 → 100644
View file @
97c8e6db
recomend_services
:
#测颜值根据五官推荐美购
-
case
:
"
请求成功,返回个数正确"
version
:
"
7.42.2"
business_tags_names
:
'
[["鼻翼缩小","玻尿酸隆鼻","耳软骨隆鼻","鼻中隔软骨隆鼻"]]'
assert
:
1
\ No newline at end of file
test_backend_data/oneimage_data/share_v4.yaml
0 → 100644
View file @
97c8e6db
share_v4
:
#测颜值结果
-
case
:
"
请求成功,有数据返回"
version
:
"
7.42.2"
face_id
:
"
15844721"
assert
:
0
\ No newline at end of file
test_backend_data/user_data/__init__.py
0 → 100644
View file @
97c8e6db
test_backend_data/user_data/answer.yaml
0 → 100644
View file @
97c8e6db
answer
:
-
case
:
"
校验接口返回成功case"
user
:
"
21476198"
assert_error
:
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