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
75309f30
Commit
75309f30
authored
Apr 23, 2021
by
张淑琴
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'common_dev' of
http://git.wanmeizhensuo.com/dengyingying/backend_auto
into common_dev
parents
82d3031e
5c4a847b
Hide whitespace changes
Inline
Side-by-side
Showing
37 changed files
with
395 additions
and
24 deletions
+395
-24
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
live_request.py
all_backend_api/live_request.py
+14
-3
live_request.yaml
all_backend_api/live_request.yaml
+18
-2
user_request.py
all_backend_api/user_request.py
+19
-0
user_request.yaml
all_backend_api/user_request.yaml
+11
-0
base_request.py
in_common/base_request.py
+6
-1
path_setting.py
path_setting.py
+14
-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
test_danmu_v2.py
test_backend_case/live_case/test_danmu_v2.py
+3
-3
test_pushlive_info.py
test_backend_case/live_case/test_pushlive_info.py
+21
-0
test_recomend_services.py
test_backend_case/oneimage_case/test_recomend_services.py
+1
-1
test_share_v4.py
test_backend_case/oneimage_case/test_share_v4.py
+1
-1
__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/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
danmu_v2.yaml
test_backend_data/live_data/danmu_v2.yaml
+8
-7
pushlive_info.yaml
test_backend_data/live_data/pushlive_info.yaml
+46
-0
recomend_services.yaml
test_backend_data/oneimage_data/recomend_services.yaml
+3
-3
share_v4.yaml
test_backend_data/oneimage_data/share_v4.yaml
+2
-1
__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.
all_backend_api/doctor_request.py
0 → 100644
View file @
75309f30
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 @
75309f30
#医生/医院主页——医生说/医院说
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 @
75309f30
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 @
75309f30
#医院主页日记列表
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 @
75309f30
#详情
#
医院主页
详情
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 @
75309f30
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 @
75309f30
#医院主页商品列表
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/live_request.py
View file @
75309f30
...
@@ -5,12 +5,23 @@ from in_common.base_request import BaseRequest
...
@@ -5,12 +5,23 @@ from in_common.base_request import BaseRequest
class
living_request
(
BaseRequest
):
class
living_request
(
BaseRequest
):
def
__init__
(
self
):
def
__init__
(
self
):
self
.
data
=
self
.
api_load
(
path_setting
.
LIVEYAML_CONFIG
)
self
.
data
=
self
.
api_load
(
path_setting
.
LIVEYAML_CONFIG
)
print
(
'====='
,
self
.
data
)
#获取弹幕
def
danmu_v2
(
self
,
channel_id
,
msg_id
,
user_id
=
""
):
def
danmu_v2
(
self
,
channel_id
,
msg_id
,
user_id
=
""
):
self
.
params
[
"channel_id"
]
=
channel_id
self
.
params
[
"channel_id"
]
=
channel_id
self
.
params
[
"msg_id"
]
=
msg_id
self
.
params
[
"msg_id"
]
=
msg_id
self
.
params
[
"user_id"
]
=
user_id
self
.
params
[
"user_id"
]
=
user_id
return
self
.
api_send
(
self
.
data
[
"danmu_v2"
])
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__'
:
if
__name__
==
'__main__'
:
(
living_request
()
.
danmu_v2
(
"739"
,
"1"
,
""
))
(
living_request
()
.
danmu_v2
(
"739"
,
"1"
))
\ No newline at end of file
(
living_request
()
.
pushlive_info
(
"小冤家"
,
"2021/04/22/1003/cef471cff5e6"
,
""
,
"1"
,
"1"
,
"1"
))
\ No newline at end of file
all_backend_api/live_request.yaml
View file @
75309f30
#获取弹幕
danmu_v2
:
danmu_v2
:
method
:
get
method
:
get
url
:
/api/live/danmu_v2
url
:
/api/live/danmu_v2
...
@@ -6,4 +7,20 @@ danmu_v2:
...
@@ -6,4 +7,20 @@ danmu_v2:
msg_id
:
${msg_id}
msg_id
:
${msg_id}
user_id
:
${user_id}
user_id
:
${user_id}
data
:
{}
data
:
{}
json
:
{}
json
:
{}
\ No newline at end of file
#主播开播
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/user_request.py
0 → 100644
View file @
75309f30
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 @
75309f30
#医院主页-问答接口
answer
:
method
:
get
url
:
/api/user/answer
params
:
user
:
${user}
count
:
10
page
:
1
data
:
{}
json
:
{}
\ No newline at end of file
in_common/base_request.py
View file @
75309f30
...
@@ -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 @
75309f30
...
@@ -58,6 +58,18 @@ HDYAML_CONFIG = os.path.join(BASE_DIR, "backend_auto/all_backend_api", "hospital
...
@@ -58,6 +58,18 @@ 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_CONFIG
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/all_backend_api"
,
"my_conversation_request.yaml"
)
...
@@ -70,6 +82,8 @@ HOME_V5=os.path.join(BASE_DIR,"backend_auto/test_backend_data/service_data","hom
...
@@ -70,6 +82,8 @@ HOME_V5=os.path.join(BASE_DIR,"backend_auto/test_backend_data/service_data","hom
LIVEYAML_CONFIG
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/all_backend_api"
,
"live_request.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"
)
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_CONFIG
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/all_backend_api"
,
"conversation_request.yaml"
)
...
...
test_backend_case/doctor_case/__init__.py
0 → 100644
View file @
75309f30
test_backend_case/doctor_case/test_article.py
0 → 100644
View file @
75309f30
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 @
75309f30
test_backend_case/hospital_case/test_diary.py
0 → 100644
View file @
75309f30
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 @
75309f30
test_backend_case/hospitals_v2_case/test_services.py
0 → 100644
View file @
75309f30
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/live_case/test_danmu_v2.py
View file @
75309f30
...
@@ -15,5 +15,5 @@ class TestDanmuV2:
...
@@ -15,5 +15,5 @@ class TestDanmuV2:
r
=
living_request
()
.
danmu_v2
(
param
[
"channel_id"
],
param
[
"msg_id"
],
param
[
"user_id"
])
r
=
living_request
()
.
danmu_v2
(
param
[
"channel_id"
],
param
[
"msg_id"
],
param
[
"user_id"
])
if
r
[
"error"
]
==
0
:
if
r
[
"error"
]
==
0
:
assert
r
[
"error"
]
==
param
[
"assert"
]
assert
r
[
"error"
]
==
param
[
"assert"
]
if
r
[
"error"
]
==
1
:
else
:
assert
r
[
"error"
]
==
param
[
"assert"
]
assert
r
[
"message"
]
==
param
[
"assert_message"
]
\ No newline at end of file
\ No newline at end of file
test_backend_case/live_case/test_pushlive_info.py
0 → 100644
View file @
75309f30
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/oneimage_case/test_recomend_services.py
View file @
75309f30
...
@@ -10,7 +10,7 @@ class TestRecomendServices:
...
@@ -10,7 +10,7 @@ class TestRecomendServices:
data
=
BaseRequest
()
.
api_load
(
path_setting
.
ONEIMAGE_RECOMEND_SERVICES_DATA
)
data
=
BaseRequest
()
.
api_load
(
path_setting
.
ONEIMAGE_RECOMEND_SERVICES_DATA
)
recomendservice_case
,
recomendservice_data
=
get_ids
(
data
,
"recomend_services"
)
recomendservice_case
,
recomendservice_data
=
get_ids
(
data
,
"recomend_services"
)
@pytest.mark.skip
(
"跳过测颜值根据五官推荐美购,目前数据是参数是线上的-------------------"
)
#
@pytest.mark.skip("跳过测颜值根据五官推荐美购,目前数据是参数是线上的-------------------")
@pytest.mark.parametrize
(
"param"
,
recomendservice_data
,
ids
=
recomendservice_case
)
@pytest.mark.parametrize
(
"param"
,
recomendservice_data
,
ids
=
recomendservice_case
)
def
test_recomend_services
(
self
,
param
):
def
test_recomend_services
(
self
,
param
):
r
=
oneimage_request
()
.
recomend_services
(
param
[
"version"
],
param
[
"business_tags_names"
])
r
=
oneimage_request
()
.
recomend_services
(
param
[
"version"
],
param
[
"business_tags_names"
])
...
...
test_backend_case/oneimage_case/test_share_v4.py
View file @
75309f30
...
@@ -13,7 +13,7 @@ class TestShareV4:
...
@@ -13,7 +13,7 @@ class TestShareV4:
data
=
BaseRequest
()
.
api_load
(
path_setting
.
ONEIMAGE_SHARE_V4_DATA
)
data
=
BaseRequest
()
.
api_load
(
path_setting
.
ONEIMAGE_SHARE_V4_DATA
)
sharev4_case
,
sharev4_data
=
get_ids
(
data
,
"share_v4"
)
sharev4_case
,
sharev4_data
=
get_ids
(
data
,
"share_v4"
)
@pytest.mark.skip
(
"跳过,测颜值结果v4,目前数据是线上的-------------------"
)
#
@pytest.mark.skip("跳过,测颜值结果v4,目前数据是线上的-------------------")
@pytest.mark.parametrize
(
"param"
,
sharev4_data
,
ids
=
sharev4_case
)
@pytest.mark.parametrize
(
"param"
,
sharev4_data
,
ids
=
sharev4_case
)
def
test_share_v4
(
self
,
param
):
def
test_share_v4
(
self
,
param
):
r
=
oneimage_request
()
.
share_v4
(
param
[
"version"
],
param
[
"face_id"
])
r
=
oneimage_request
()
.
share_v4
(
param
[
"version"
],
param
[
"face_id"
])
...
...
test_backend_case/user_case/__init__.py
0 → 100644
View file @
75309f30
test_backend_case/user_case/test_answer.py
0 → 100644
View file @
75309f30
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/doctor_data/__init__.py
0 → 100644
View file @
75309f30
test_backend_data/doctor_data/article.yaml
0 → 100644
View file @
75309f30
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 @
75309f30
test_backend_data/hospital_data/diary.yaml
0 → 100644
View file @
75309f30
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 @
75309f30
test_backend_data/hospitals_v2_data/services.yaml
0 → 100644
View file @
75309f30
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/live_data/danmu_v2.yaml
View file @
75309f30
...
@@ -6,11 +6,12 @@ danmu_v2:
...
@@ -6,11 +6,12 @@ danmu_v2:
msg_id
:
1
msg_id
:
1
user_id
:
"
"
user_id
:
"
"
assert
:
0
assert
:
0
assert_message
:
"
获取弹幕失败"
#获取弹幕失败case
#获取弹幕失败case
-
# -
case
:
"
获取弹幕失败-进入房间失败"
# case: "获取弹幕失败-获取房间信息失败"
channel_id
:
"
"
# channel_id: ""
msg_id
:
1
# msg_id: 1
user_id
:
"
"
# user_id: ""
assert
:
0
# assert: 0
\ No newline at end of file
\ No newline at end of file
test_backend_data/live_data/pushlive_info.yaml
0 → 100644
View file @
75309f30
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/oneimage_data/recomend_services.yaml
View file @
75309f30
...
@@ -3,5 +3,5 @@ recomend_services:
...
@@ -3,5 +3,5 @@ recomend_services:
-
-
case
:
"
请求成功,返回个数正确"
case
:
"
请求成功,返回个数正确"
version
:
"
7.42.2"
version
:
"
7.42.2"
business_tags_names
:
'
[["玻尿酸垫下巴","自体脂肪垫下巴","硅胶垫下巴","膨体垫下巴"],["半永久纹眉","植眉"]]'
business_tags_names
:
'
[["鼻翼缩小","玻尿酸隆鼻","耳软骨隆鼻","鼻中隔软骨隆鼻"]]'
assert
:
2
assert
:
1
\ No newline at end of file
\ No newline at end of file
test_backend_data/oneimage_data/share_v4.yaml
View file @
75309f30
...
@@ -3,5 +3,5 @@ share_v4:
...
@@ -3,5 +3,5 @@ share_v4:
-
-
case
:
"
请求成功,有数据返回"
case
:
"
请求成功,有数据返回"
version
:
"
7.42.2"
version
:
"
7.42.2"
face_id
:
"
27320150
"
face_id
:
"
15844721
"
assert
:
0
assert
:
0
\ No newline at end of file
test_backend_data/user_data/__init__.py
0 → 100644
View file @
75309f30
test_backend_data/user_data/answer.yaml
0 → 100644
View file @
75309f30
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