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
1d5c7e53
Commit
1d5c7e53
authored
May 20, 2021
by
张伟男
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'common_dev' into zwn_dev
parents
551e48c9
6005ad37
Show whitespace changes
Inline
Side-by-side
Showing
33 changed files
with
579 additions
and
54 deletions
+579
-54
feed_request.py
all_backend_api/feed_request.py
+25
-0
feed_request.yaml
all_backend_api/feed_request.yaml
+24
-0
janus_request.py
all_backend_api/janus_request.py
+34
-1
janus_request.yaml
all_backend_api/janus_request.yaml
+33
-0
search_request.py
all_backend_api/search_request.py
+23
-1
search_request.yaml
all_backend_api/search_request.yaml
+18
-0
service_request.py
all_backend_api/service_request.py
+8
-0
service_request.yaml
all_backend_api/service_request.yaml
+11
-0
services_request.py
all_backend_api/services_request.py
+20
-0
services_request.yaml
all_backend_api/services_request.yaml
+10
-0
path_setting.py
path_setting.py
+27
-0
test_community.py
test_backend_case/feed_case/test_community.py
+23
-0
test_config_list.py
test_backend_case/feed_case/test_config_list.py
+23
-0
test_services.py
test_backend_case/hospitals_v2_case/test_services.py
+7
-7
test_hospital_search.py
test_backend_case/janus_case/test_hospital_search.py
+2
-2
test_polymer.py
test_backend_case/janus_case/test_polymer.py
+19
-0
test_product_detail.py
test_backend_case/janus_case/test_product_detail.py
+22
-0
test_sku_info.py
test_backend_case/janus_case/test_sku_info.py
+19
-0
test_content_v6.py
test_backend_case/search_case/test_content_v6.py
+27
-0
test_service_favor.py
test_backend_case/service_case/test_service_favor.py
+21
-0
__init__.py
test_backend_case/services_case/__init__.py
+0
-0
test_share_data.py
test_backend_case/services_case/test_share_data.py
+21
-0
community.yaml
test_backend_data/feed_data/community.yaml
+10
-0
config_list.yaml
test_backend_data/feed_data/config_list.yaml
+8
-0
services.yaml
test_backend_data/hospitals_v2_data/services.yaml
+27
-27
hospital_search.yaml
test_backend_data/janus_data/hospital_search.yaml
+19
-16
polymer.yaml
test_backend_data/janus_data/polymer.yaml
+15
-0
product_detail.yaml
test_backend_data/janus_data/product_detail.yaml
+24
-0
sku_info.yaml
test_backend_data/janus_data/sku_info.yaml
+7
-0
content_v6.yaml
test_backend_data/search_data/content_v6.yaml
+40
-0
service_favor.yaml
test_backend_data/service_data/service_favor.yaml
+5
-0
__init__.py
test_backend_data/services_data/__init__.py
+0
-0
share_data.yaml
test_backend_data/services_data/share_data.yaml
+7
-0
No files found.
all_backend_api/feed_request.py
View file @
1d5c7e53
...
...
@@ -5,6 +5,9 @@ from in_common.base_request import BaseRequest
class
feed_request
(
BaseRequest
):
def
__init__
(
self
):
self
.
data
=
self
.
api_load
(
path_setting
.
FEED_INDEXV9_CONFIG
)
self
.
data
=
self
.
api_load
(
path_setting
.
CONFIG_LIST_CONFIG
)
self
.
data
=
self
.
api_load
(
path_setting
.
COMMUNITY_CONFIG
)
def
index_v9
(
self
,
tabtype
,
version
,
current_city_id
):
self
.
params
[
"tabtype"
]
=
tabtype
...
...
@@ -13,6 +16,27 @@ class feed_request(BaseRequest):
return
self
.
api_send
(
self
.
data
[
"index_v9"
])
#社区tab页签到和招募活动列表
def
config_list
(
self
,
version
):
self
.
params
[
"version"
]
=
version
return
self
.
api_send
(
self
.
data
[
"config_list"
])
# 社区tab页feed流
def
community
(
self
,
version
,
tabtype
,
tags_id
,
tab_id
):
self
.
params
[
"version"
]
=
version
self
.
params
[
"tabtype"
]
=
tabtype
self
.
params
[
"tags_id"
]
=
tags_id
self
.
params
[
"tab_id"
]
=
tab_id
return
self
.
api_send
(
self
.
data
[
"community"
])
if
__name__
==
'__main__'
:
print
(
feed_request
()
.
index_v9
(
"choice"
,
"7.42.2"
,
"beijing"
))
#社区tab页签到和招募活动列表
print
(
feed_request
()
.
config_list
())
#社区tab页签到和招募活动列表
print
(
feed_request
()
.
community
())
\ No newline at end of file
all_backend_api/feed_request.yaml
View file @
1d5c7e53
...
...
@@ -8,3 +8,26 @@ index_v9:
data
:
json
:
{}
isLogin
:
1
#社区tab签到和招募活动列表
config_list
:
method
:
get
url
:
/api/feed/community_activity/config_list
params
:
version
:
${version}
data
:
json
:
{}
isLogin
:
1
#社区tab页feed流
community
:
method
:
get
url
:
/api/feed/index/community
params
:
version
:
${version}
tabtype
:
choice
tags_id
:
[]
tab_id
:
0
data
:
json
:
{}
isLogin
:
1
\ No newline at end of file
all_backend_api/janus_request.py
View file @
1d5c7e53
...
...
@@ -10,6 +10,8 @@ class janus_request(BaseRequest):
#品类聚合页面商品列表
self
.
data
=
self
.
api_load
(
path_setting
.
TAG_SERVICE_CONFIG
)
#品类聚合页面标签和专场
self
.
data
=
self
.
api_load
(
path_setting
.
POLYMER_CONFIG
)
#搜索结果页-综合/百科tab
def
content_v7
(
self
,
query
,
device_id
,
current_city_id
,
version
,
is_first
,
tab_type
,
offset
):
...
...
@@ -31,7 +33,7 @@ class janus_request(BaseRequest):
return
self
.
api_send
(
self
.
data
[
'content_v7'
])
#医院主页搜索
def
hospital_search
(
self
,
query
,
device_id
,
hospital_id
,
current_city_id
,
version
,
offset
):
def
hospital_search
(
self
,
query
,
device_id
,
hospital_id
,
current_city_id
,
version
,
offset
,
size
):
#搜索词
self
.
params
[
'query'
]
=
query
#设备号
...
...
@@ -44,6 +46,8 @@ class janus_request(BaseRequest):
self
.
params
[
'version'
]
=
version
#请求的页数 0,10,20
self
.
params
[
'offset'
]
=
offset
# 单页请求数量
self
.
params
[
'size'
]
=
size
return
self
.
api_send
(
self
.
data
[
'hospital_search'
])
...
...
@@ -51,6 +55,19 @@ class janus_request(BaseRequest):
def
mine_guess_you_like
(
self
):
return
self
.
api_send
(
self
.
data
[
"mine_guess_you_like"
])
#商祥页-详情
def
product_detail
(
self
,
service_id
,
service_item_id
,
version
):
self
.
params
[
"service_id"
]
=
service_id
self
.
params
[
"service_item_id"
]
=
service_item_id
self
.
params
[
"version"
]
=
version
return
self
.
api_send
(
self
.
data
[
"product_detail"
])
#商祥页-sku信息
def
sku_info
(
self
,
service_id
,
service_item_id
):
self
.
params
[
"service_id"
]
=
service_id
self
.
params
[
"service_item_id"
]
=
service_item_id
return
self
.
api_send
(
self
.
data
[
"sku_info"
])
# 品类聚合页面商品列表
def
tag_service
(
self
,
size
,
tag_ids
,
offset
,
tag_id
,
version
,
device_id
):
print
(
"fgx"
)
...
...
@@ -63,14 +80,30 @@ class janus_request(BaseRequest):
return
self
.
api_send
(
self
.
data
[
"tag_service"
])
# 品类聚合页面标签和专场
def
polymer
(
self
,
version
,
category_polymer_id
,
device_id
):
print
(
"fgx"
)
self
.
params
[
'version'
]
=
version
self
.
params
[
'category_polymer_id'
]
=
category_polymer_id
self
.
params
[
'device_id'
]
=
device_id
return
self
.
api_send
(
self
.
data
[
"polymer"
])
if
__name__
==
'__main__'
:
#打印购物车-猜你喜欢列表接口返回
print
(
janus_request
()
.
mine_guess_you_like
())
#打印商祥页-详情接口返回
print
(
janus_request
()
.
product_detail
(
"5857263"
,
"618788"
,
"7.43.0"
))
#打印商祥页-sku信息接口返回
print
(
janus_request
()
.
sku_info
(
"5857263"
,
"618788"
))
#品类聚合页面商品列表接口返回
print
(
janus_request
()
.
tag_service
())
print
(
"fgx"
)
#品类聚合页面标签和专场
print
(
janus_request
()
.
polymer
())
print
(
"fgx"
)
all_backend_api/janus_request.yaml
View file @
1d5c7e53
...
...
@@ -23,6 +23,7 @@ hospital_search:
current_city_id
:
${current_city_id}
version
:
${version}
offset
:
${offset}
size
:
${size}
data
:
{
}
json
:
{
}
...
...
@@ -36,6 +37,27 @@ mine_guess_you_like:
json
:
{}
isLogin
:
1
#商祥页-详情
product_detail
:
method
:
get
url
:
/api/janus/product/detail
params
:
service_id
:
${service_id}
service_item_id
:
${service_item_id}
version
:
${version}
data
:
{}
json
:
{}
#商祥页-sku信息
sku_info
:
method
:
get
url
:
/api/janus/product/detail/sku_info
params
:
service_id
:
${service_id}
service_item_id
:
${service_item_id}
data
:
{}
json
:
{}
#品类聚合页面商品列表的
tag_service
:
method
:
GET
...
...
@@ -51,6 +73,17 @@ tag_service:
json
:
{
}
#品类聚合页标签和专场
polymer
:
method
:
GET
url
:
/api/janus/product/polymer
params
:
version
:
${version}
category_polymer_id
:
${category_polymer_id}
device_id
:
${device_id}
data
:
{
}
json
:
{
}
...
...
all_backend_api/search_request.py
View file @
1d5c7e53
...
...
@@ -4,10 +4,31 @@ from in_common.base_request import BaseRequest
class
search_request
(
BaseRequest
):
def
__init__
(
self
):
self
.
data
=
self
.
api_load
(
path_setting
.
KEYWORDS_CONFIG
)
self
.
data
=
self
.
api_load
(
path_setting
.
KEYWORDS_CONFIG
)
#keywords路径
self
.
data
=
self
.
api_load
(
path_setting
.
CONTENTV6_CONFIG
)
#content_v6路径
#搜索首页-热门搜索模块(点击搜索框即调接口)
def
keywords
(
self
,
current_city_id
,
search_tab
):
self
.
params
[
"current_city_id"
]
=
current_city_id
self
.
params
[
"search_tab"
]
=
search_tab
return
self
.
api_send
(
self
.
data
[
"keywords"
])
#搜索结果页-医生/医院tab
def
content_v6
(
self
,
query
,
device_id
,
current_city_id
,
version
,
is_first
,
tab_type
,
offset
,
size
):
#搜索词
self
.
params
[
'query'
]
=
query
#设备号
self
.
params
[
'device_id'
]
=
device_id
#当前城市
self
.
params
[
'current_city_id'
]
=
current_city_id
#APP版本
self
.
params
[
'version'
]
=
version
#是否为第一次请求
self
.
params
[
'is_first'
]
=
is_first
#类型
self
.
params
[
'tab_type'
]
=
tab_type
#请求的页数 0,10,20
self
.
params
[
'offset'
]
=
offset
# 请求的size
self
.
params
[
'size'
]
=
size
return
self
.
api_send
(
self
.
data
[
"content_v6"
])
\ No newline at end of file
all_backend_api/search_request.yaml
View file @
1d5c7e53
...
...
@@ -8,3 +8,20 @@ keywords:
search_tab
:
${search_tab}
data
:
{}
json
:
{}
content_v6
:
method
:
get
#接口地址
url
:
/api/search/v6/content
#列出所有定义函数时的参数
params
:
query
:
${query}
device_id
:
${device_id}
current_city_id
:
${current_city_id}
version
:
${version}
is_first
:
${is_first}
tab_type
:
${tab_type}
offset
:
${offset}
size
:
${size}
data
:
{}
json
:
{}
\ No newline at end of file
all_backend_api/service_request.py
View file @
1d5c7e53
...
...
@@ -11,6 +11,13 @@ class service_request(BaseRequest):
return
self
.
api_send
(
self
.
data
[
"home_v5"
])
#商祥页-收藏
def
service_favor
(
self
):
return
self
.
api_send
(
self
.
data
[
"service_favor"
])
if
__name__
==
'__main__'
:
print
(
service_request
()
.
home_v5
())
#打印商祥页-收藏接口返回
print
(
service_request
()
.
service_favor
())
\ No newline at end of file
all_backend_api/service_request.yaml
View file @
1d5c7e53
...
...
@@ -6,3 +6,13 @@ home_v5:
data
:
{}
json
:
{}
#商祥页-收藏
service_favor
:
method
:
post
url
:
/api/service/favor/5857263/
params
:
{}
data
:
{}
json
:
{}
isLogin
:
1
\ No newline at end of file
all_backend_api/services_request.py
0 → 100644
View file @
1d5c7e53
import
path_setting
from
in_common.base_request
import
BaseRequest
class
services_request
(
BaseRequest
):
def
__init__
(
self
):
self
.
data
=
self
.
api_load
(
path_setting
.
SERVICES_CONFIG
)
#商祥页-分享
def
share_data
(
self
,
p_id
,
u_id
):
self
.
params
[
"p_id"
]
=
p_id
self
.
params
[
"u_id"
]
=
u_id
return
self
.
api_send
(
self
.
data
[
"share_data"
])
if
__name__
==
'__main__'
:
#打印商祥页-分享接口返回
print
(
services_request
()
.
share_data
(
"5857263"
,
"618788"
))
\ No newline at end of file
all_backend_api/services_request.yaml
0 → 100644
View file @
1d5c7e53
#商祥页-分享
share_data
:
method
:
get
url
:
/api/services/share_data
params
:
p_id
:
${p_id}
u_id
:
${u_id}
data
:
{}
json
:
{}
\ No newline at end of file
path_setting.py
View file @
1d5c7e53
...
...
@@ -135,10 +135,37 @@ UNREAD = os.path.join(BASE_DIR, "backend_auto/test_backend_data/notification_dat
#标记为已读
READALL
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_backend_data/notification_data"
,
"readall.yaml"
)
#商祥页-详情
JANUS_PRODUCT_DETAIL
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_backend_data/janus_data"
,
"product_detail.yaml"
)
#商祥页-sku信息
JANUS_SKU_INFO
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_backend_data/janus_data"
,
"sku_info.yaml"
)
#商祥页-收藏
SERVICE_FAVOR
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_backend_data/service_data"
,
"service_favor.yaml"
)
#商祥页-分享
SERVICES_CONFIG
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/all_backend_api"
,
"services_request.yaml"
)
SERVICES_SHARE_DATA
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_backend_data/services_data"
,
"share_data.yaml"
)
#捜索结果页-医生/医院tab
CONTENTV6_CONFIG
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/all_backend_api"
,
"search_request.yaml"
)
CONTENTV6
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_backend_data/search_data"
,
"content_v6.yaml"
)
#品类聚合页面商品列表
TAG_SERVICE_CONFIG
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/all_backend_api"
,
"janus_request.yaml"
)
TAG_SERVICE
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_backend_data/janus_data"
,
"tag_service.yaml"
)
#社区tab签到和招募活动
CONFIG_LIST_CONFIG
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/all_backend_api"
,
"feed_request.yaml"
)
CONFIG_LIST
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_backend_data/feed_data"
,
"config_list.yaml"
)
#社区tabfeed流
COMMUNITY_CONFIG
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/all_backend_api"
,
"feed_request.yaml"
)
COMMUNITY
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_backend_data/feed_data"
,
"community.yaml"
)
#品类聚合页面标签和专场
POLYMER_CONFIG
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/all_backend_api"
,
"janus_request.yaml"
)
POLYMER
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_backend_data/janus_data"
,
"polymer.yaml"
)
if
__name__
==
'__main__'
:
print
(
"=========="
,
LIVEYAML_CONFIG
)
test_backend_case/feed_case/test_community.py
0 → 100644
View file @
1d5c7e53
import
pytest
from
ids_list
import
get_ids
import
path_setting
from
in_common.base_request
import
BaseRequest
from
all_backend_api.feed_request
import
feed_request
class
TestCommunity
:
data
=
BaseRequest
()
.
api_load
(
path_setting
.
COMMUNITY
)
community_case
,
community_data
=
get_ids
(
data
,
"community"
)
@pytest.mark.parametrize
(
"param"
,
community_data
,
ids
=
community_case
)
def
test_community
(
self
,
param
):
r
=
feed_request
()
.
community
(
param
[
"version"
],
param
[
"tabtype"
],
param
[
"tags_id"
],
param
[
"tab_id"
])
if
r
[
"error"
]
==
0
:
assert
r
[
"data"
][
"features"
][
0
]
!=
param
[
"assert"
]
# else:
# assert r["data"]["config_list"][0]["type"] == param["assert1"]
test_backend_case/feed_case/test_config_list.py
0 → 100644
View file @
1d5c7e53
import
pytest
from
ids_list
import
get_ids
import
path_setting
from
in_common.base_request
import
BaseRequest
from
all_backend_api.feed_request
import
feed_request
class
TestConfigList
:
data
=
BaseRequest
()
.
api_load
(
path_setting
.
CONFIG_LIST
)
configlist_case
,
configlist_data
=
get_ids
(
data
,
"config_list"
)
@pytest.mark.parametrize
(
"param"
,
configlist_data
,
ids
=
configlist_case
)
def
test_config_list
(
self
,
param
):
r
=
feed_request
()
.
config_list
(
param
[
"version"
])
if
r
[
"error"
]
==
0
:
assert
r
[
"data"
][
"config_list"
][
0
][
"type"
]
!=
param
[
"assert"
]
# else:
# assert r["data"]["config_list"][0]["type"] == param["assert1"]
test_backend_case/hospitals_v2_case/test_services.py
View file @
1d5c7e53
...
...
@@ -16,13 +16,13 @@ class TestServices:
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"
]
#
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/janus_case/test_hospital_search.py
View file @
1d5c7e53
...
...
@@ -13,9 +13,9 @@ class TestHospitalSearch:
@pytest.mark.parametrize
(
"param"
,
hospitalsearch_data
,
ids
=
hospitalsearch_case
)
def
test_hospital_search
(
self
,
param
):
print
(
param
[
'query'
])
r
=
janus_request
()
.
hospital_search
(
param
[
"query"
],
param
[
"device_id"
],
param
[
"hospital_id"
],
param
[
"current_city_id"
],
param
[
"version"
],
param
[
"offset"
])
r
=
janus_request
()
.
hospital_search
(
param
[
"query"
],
param
[
"device_id"
],
param
[
"hospital_id"
],
param
[
"current_city_id"
],
param
[
"version"
],
param
[
"offset"
]
,
param
[
"size"
]
)
if
r
[
"error"
]
==
0
:
assert
len
(
r
[
"data"
][
"search_skus"
])
!=
param
[
"assert1"
]
assert
len
(
r
[
"data"
][
"
search
_skus"
])
==
param
[
"assert2"
]
assert
len
(
r
[
"data"
][
"
remai
_skus"
])
==
param
[
"assert2"
]
if
r
[
"error"
]
==
1
:
assert
r
[
"message"
]
==
param
[
"assert"
]
test_backend_case/janus_case/test_polymer.py
0 → 100644
View file @
1d5c7e53
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
TestPolymer
:
data
=
BaseRequest
()
.
api_load
(
path_setting
.
POLYMER
)
polymer_case
,
polymer_data
=
get_ids
(
data
,
"polymer"
)
@pytest.mark.parametrize
(
"param"
,
polymer_data
,
ids
=
polymer_case
)
def
test_polymer
(
self
,
param
):
r
=
janus_request
()
.
polymer
(
param
[
"version"
],
param
[
"category_polymer_id"
],
param
[
"device_id"
])
print
(
'feng='
,
r
)
if
r
[
"error"
]
==
0
:
assert
r
[
"data"
][
"id"
]
==
param
[
"assert"
]
test_backend_case/janus_case/test_product_detail.py
0 → 100644
View file @
1d5c7e53
import
pytest
from
all_backend_api.janus_request
import
janus_request
from
ids_list
import
get_ids
import
path_setting
from
in_common.base_request
import
BaseRequest
class
TestProductDetail
:
data
=
BaseRequest
()
.
api_load
(
path_setting
.
JANUS_PRODUCT_DETAIL
)
product_detail_case
,
product_detail_data
=
get_ids
(
data
,
"product_detail"
)
@pytest.mark.parametrize
(
"param"
,
product_detail_data
,
ids
=
product_detail_case
)
def
test_product_detail
(
self
,
param
):
r
=
janus_request
()
.
product_detail
(
param
[
"service_id"
],
param
[
"service_item_id"
],
param
[
"version"
])
if
r
[
"error"
]
==
0
:
assert
r
[
"error"
]
==
param
[
"assert_error"
]
if
r
[
"error"
]
==
1
:
assert
r
[
"message"
]
==
param
[
"assert_spu_message"
]
# if r["error"] == -1:
# assert r["message"] == param["assert_version_message"]
test_backend_case/janus_case/test_sku_info.py
0 → 100644
View file @
1d5c7e53
import
pytest
from
all_backend_api.janus_request
import
janus_request
from
ids_list
import
get_ids
import
path_setting
from
in_common.base_request
import
BaseRequest
class
TestSkuInfo
:
data
=
BaseRequest
()
.
api_load
(
path_setting
.
JANUS_SKU_INFO
)
sku_info_case
,
sku_info_data
=
get_ids
(
data
,
"sku_info"
)
@pytest.mark.parametrize
(
"param"
,
sku_info_data
,
ids
=
sku_info_case
)
def
test_sku_info
(
self
,
param
):
r
=
janus_request
()
.
sku_info
(
param
[
"service_id"
],
param
[
"service_item_id"
])
if
r
[
"error"
]
==
0
:
assert
r
[
"error"
]
==
param
[
"assert_error"
]
test_backend_case/search_case/test_content_v6.py
0 → 100644
View file @
1d5c7e53
#搜索结果页-医生/医院tab
import
pytest
import
path_setting
from
all_backend_api.search_request
import
search_request
from
ids_list
import
get_ids
from
in_common.base_request
import
BaseRequest
class
TestContentV6
:
data
=
BaseRequest
()
.
api_load
(
path_setting
.
CONTENTV6
)
contentv6_case
,
contentv6_data
=
get_ids
(
data
,
"content_v6"
)
@pytest.mark.parametrize
(
"param"
,
contentv6_data
,
ids
=
contentv6_case
)
def
test_content_v6
(
self
,
param
):
print
(
param
[
'query'
])
r
=
search_request
()
.
content_v6
(
param
[
"query"
],
param
[
"device_id"
],
param
[
"current_city_id"
],
param
[
"version"
],
param
[
"is_first"
],
param
[
"tab_type"
],
param
[
"offset"
],
param
[
"size"
])
if
r
[
"error"
]
==
0
:
if
param
[
"tab_type"
]
==
3
:
assert
r
[
"data"
][
"hospitals"
][
0
][
"name"
]
==
param
[
"assert"
]
if
param
[
"tab_type"
]
==
4
:
assert
r
[
"data"
][
"doctors"
][
0
][
"name"
]
==
param
[
"assert"
]
if
r
[
"error"
]
==
1
:
assert
r
[
"message"
]
==
param
[
"assert"
]
\ No newline at end of file
test_backend_case/service_case/test_service_favor.py
0 → 100644
View file @
1d5c7e53
import
pytest
from
all_backend_api.service_request
import
service_request
from
ids_list
import
get_ids
import
path_setting
from
in_common.base_request
import
BaseRequest
class
TestServiceFavor
:
data
=
BaseRequest
()
.
api_load
(
path_setting
.
SERVICE_FAVOR
)
service_favor_case
,
service_favor_data
=
get_ids
(
data
,
"service_favor"
)
@pytest.mark.parametrize
(
"param"
,
service_favor_data
,
ids
=
service_favor_case
)
def
test_service_favor
(
self
,
param
):
r
=
service_request
()
.
service_favor
()
if
r
[
"error"
]
==
0
:
assert
r
[
"message"
]
==
param
[
"assert_message"
]
print
(
service_request
()
.
service_favor
())
test_backend_case/services_case/__init__.py
0 → 100644
View file @
1d5c7e53
test_backend_case/services_case/test_share_data.py
0 → 100644
View file @
1d5c7e53
import
pytest
from
all_backend_api.services_request
import
services_request
from
ids_list
import
get_ids
import
path_setting
from
in_common.base_request
import
BaseRequest
class
TestShareData
:
data
=
BaseRequest
()
.
api_load
(
path_setting
.
SERVICES_SHARE_DATA
)
share_data_case
,
share_data_data
=
get_ids
(
data
,
"share_data"
)
@pytest.mark.parametrize
(
"param"
,
share_data_data
,
ids
=
share_data_case
)
def
test_share_data
(
self
,
param
):
r
=
services_request
()
.
share_data
(
param
[
"p_id"
],
param
[
"u_id"
])
if
r
[
"error"
]
==
0
:
assert
r
[
"error"
]
==
param
[
"assert_error"
]
# print(services_request().share_data())
test_backend_data/feed_data/community.yaml
0 → 100644
View file @
1d5c7e53
community
:
#社区tab页feed流
-
case
:
"
社区tab页
feed流"
version
:
"
7.43.0"
assert
:
null
tabtype
:
choice
tags_id
:
[]
tab_id
:
0
\ No newline at end of file
test_backend_data/feed_data/config_list.yaml
0 → 100644
View file @
1d5c7e53
config_list
:
#社区tab获取签到和招募case
-
case
:
"
社区tab签到和招募,有数据返回"
version
:
"
7.43.0"
assert
:
null
assert1
:
1
\ No newline at end of file
test_backend_data/hospitals_v2_data/services.yaml
View file @
1d5c7e53
...
...
@@ -2,31 +2,31 @@ services:
-
case
:
"
校验接口调用成功case"
assert_error
:
0
assert_sku
:
608136
assert_spu
:
5844882
assert_discount
:
True
assert_sales
:
3
assert_card_type
:
"
card"
assert_title
:
"
【阴道紧缩】菲蜜丽激光外阴收紧,【激光阴道紧缩】进口菲蜜丽
外阴收紧
小阴唇整形+私密清洁
阴道紧致
紧致润滑
产后修复
改善松弛"
assert_tagselected
:
true
-
case
:
"
校验商品数据case"
assert_error
:
0
assert_sku
:
608136
assert_spu
:
5844882
assert_discount
:
True
assert_sales
:
3
assert_card_type
:
"
card"
assert_title
:
"
【阴道紧缩】菲蜜丽激光外阴收紧,【激光阴道紧缩】进口菲蜜丽
外阴收紧
小阴唇整形+私密清洁
阴道紧致
紧致润滑
产后修复
改善松弛"
assert_tagselected
:
true
-
case
:
"
校验商品标签数据case"
assert_error
:
0
assert_sku
:
608136
assert_spu
:
5844882
assert_discount
:
True
assert_sales
:
3
assert_card_type
:
"
card"
assert_title
:
"
【阴道紧缩】菲蜜丽激光外阴收紧,【激光阴道紧缩】进口菲蜜丽
外阴收紧
小阴唇整形+私密清洁
阴道紧致
紧致润滑
产后修复
改善松弛"
assert_tagselected
:
true
#
assert_sku: 608136
#
assert_spu: 5844882
#
assert_discount: True
#
assert_sales: 3
#
assert_card_type: "card"
#
assert_title: "【阴道紧缩】菲蜜丽激光外阴收紧,【激光阴道紧缩】进口菲蜜丽 外阴收紧 小阴唇整形+私密清洁 阴道紧致 紧致润滑 产后修复 改善松弛"
#
assert_tagselected: true
#
-
#
case: "校验商品数据case"
#
assert_error: 0
#
assert_sku: 608136
#
assert_spu: 5844882
#
assert_discount: True
#
assert_sales: 3
#
assert_card_type: "card"
#
assert_title: "【阴道紧缩】菲蜜丽激光外阴收紧,【激光阴道紧缩】进口菲蜜丽 外阴收紧 小阴唇整形+私密清洁 阴道紧致 紧致润滑 产后修复 改善松弛"
#
assert_tagselected: true
#
-
#
case: "校验商品标签数据case"
#
assert_error: 0
#
assert_sku: 608136
#
assert_spu: 5844882
#
assert_discount: True
#
assert_sales: 3
#
assert_card_type: "card"
#
assert_title: "【阴道紧缩】菲蜜丽激光外阴收紧,【激光阴道紧缩】进口菲蜜丽 外阴收紧 小阴唇整形+私密清洁 阴道紧致 紧致润滑 产后修复 改善松弛"
#
assert_tagselected: true
test_backend_data/janus_data/hospital_search.yaml
View file @
1d5c7e53
hospital_search
:
-
#医院主页搜索---搜索成功,有数据召回
case
:
"
医院主页搜索---搜索成功,
有数据召回
"
case
:
"
医院主页搜索---搜索成功,
当前搜索词召回的对应商品不少于5个,不展示热卖推荐商品
"
query
:
"
玻尿酸"
device_id
:
"
1321222222222222135"
hospital_id
:
"
96ea37eef81d11e692f800163e000a4a"
current_city_id
:
"
beijing"
version
:
"
742.2"
offset
:
"
0"
size
:
"
10"
assert1
:
0
assert2
:
1
0
assert2
:
0
-
#医院主页搜索---搜索成功,无数据召回
case
:
"
医院主页搜索---搜索成功,
无数据召回
"
case
:
"
医院主页搜索---搜索成功,
当前搜索词下无对应商品,召回热卖推荐商品
"
query
:
"
美白针"
device_id
:
"
1321222222222222135"
hospital_id
:
"
96ea37eef81d11e692f800163e000a4a"
current_city_id
:
"
beijing"
version
:
"
742.2"
offset
:
"
0"
size
:
"
10"
assert1
:
10
assert2
:
0
assert2
:
1
0
# -
# #医院主页搜索---搜索成功,无数据召回
# case: "医院主页搜索---搜索成功,无数据召回"
# query: "瘦脸针"
# device_id: "1321222222222222135"
# hospital_id: "96ea37eef81d11e692f800163e000a4a"
# current_city_id: "beijing"
# version: "742.2"
# offset: "0"
# assert1: 0
# assert2: 0
\ No newline at end of file
-
#医院主页搜索---搜索成功,无数据召回
case
:
"
医院主页搜索---搜索成功,当前搜索词召回的对应商品少于5个,展示热卖推荐商品"
query
:
"
瘦脸针"
device_id
:
"
1321222222222222135"
hospital_id
:
"
96ea37eef81d11e692f800163e000a4a"
current_city_id
:
"
beijing"
version
:
"
742.2"
offset
:
"
0"
size
:
"
10"
assert1
:
10
assert2
:
10
\ No newline at end of file
test_backend_data/janus_data/polymer.yaml
0 → 100644
View file @
1d5c7e53
polymer
:
#品类聚合页标签和专场banner
-
case
:
"
品类聚合页面标签和专场banner"
assert
:
82
version
:
7.43.0
category_polymer_id
:
82
device_id
:
869378034450718
test_backend_data/janus_data/product_detail.yaml
0 → 100644
View file @
1d5c7e53
product_detail
:
-
case
:
"
校验接口调用成功case"
service_id
:
"
5857263"
service_item_id
:
"
618788"
version
:
"
7.43.0"
assert_error
:
0
-
case
:
"
校验spu_id错误case"
service_id
:
"
585726"
service_item_id
:
"
618788"
version
:
"
7.43.0"
assert_spu_message
:
"
美购不存在"
# -
# case: "校验sku_id错误case"
# service_id: "5857263"
# service_item_id: "61878"
# version: "7.43.0"
# assert_sku_message: ""
# -
# case: "校验不传版本号case"
# service_id: "5857263"
# service_item_id: "618788"
# assert_version_message: "服务器开小差儿了"
test_backend_data/janus_data/sku_info.yaml
0 → 100644
View file @
1d5c7e53
sku_info
:
-
case
:
"
校验接口返回成功case"
service_id
:
"
5857263"
service_item_id
:
"
618788"
assert_error
:
0
\ No newline at end of file
test_backend_data/search_data/content_v6.yaml
0 → 100644
View file @
1d5c7e53
content_v6
:
-
#医院tab-捜索医院全称,捜索结果只召回该医院
case
:
"
医院tab-捜索医院全称,捜索结果只召回该医院"
query
:
"
北京画美医院"
device_id
:
"
97B6764B-2135-4761-9911-701C38CBC272"
current_city_id
:
"
beijing"
version
:
"
742.2"
is_first
:
"
0"
tab_type
:
"
3"
offset
:
"
0"
size
:
"
10"
assert
:
北京画美医院
-
#医院tab-捜索医院简称,捜索结果只召回该医院
case
:
"
医院tab-捜索医院简称,捜索结果只召回该医院"
query
:
"
北京画美"
device_id
:
"
97B6764B-2135-4761-9911-701C38CBC272"
current_city_id
:
"
beijing"
version
:
"
742.2"
is_first
:
"
0"
tab_type
:
"
3"
offset
:
"
0"
size
:
"
10"
assert
:
北京画美医院
-
#医生tab-捜索医生姓名,捜索结果只召回该医生
case
:
"
医生tab-捜索医生姓名,捜索结果只召回该医生"
query
:
"
崔鑫"
device_id
:
"
97B6764B-2135-4761-9911-701C38CBC272"
current_city_id
:
"
beijing"
version
:
"
742.2"
is_first
:
"
0"
tab_type
:
"
4"
offset
:
"
0"
size
:
"
10"
assert
:
崔鑫
\ No newline at end of file
test_backend_data/service_data/service_favor.yaml
0 → 100644
View file @
1d5c7e53
service_favor
:
-
case
:
"
校验收藏成功case"
assert_message
:
"
收藏成功"
\ No newline at end of file
test_backend_data/services_data/__init__.py
0 → 100644
View file @
1d5c7e53
test_backend_data/services_data/share_data.yaml
0 → 100644
View file @
1d5c7e53
share_data
:
-
case
:
"
校验接口返回成功case"
p_id
:
"
5857263"
u_id
:
"
618788"
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