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
8daadceb
Commit
8daadceb
authored
May 20, 2021
by
aha
Browse files
Options
Browse Files
Download
Plain Diff
医院/医生tab捜索结果
parents
6c5bb1d0
bde756a2
Show whitespace changes
Inline
Side-by-side
Showing
17 changed files
with
223 additions
and
1 deletion
+223
-1
janus_request.py
all_backend_api/janus_request.py
+17
-1
janus_request.yaml
all_backend_api/janus_request.yaml
+21
-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
+10
-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_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
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
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/janus_request.py
View file @
8daadceb
...
@@ -53,6 +53,19 @@ class janus_request(BaseRequest):
...
@@ -53,6 +53,19 @@ class janus_request(BaseRequest):
def
mine_guess_you_like
(
self
):
def
mine_guess_you_like
(
self
):
return
self
.
api_send
(
self
.
data
[
"mine_guess_you_like"
])
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
):
def
tag_service
(
self
,
size
,
tag_ids
,
offset
,
tag_id
,
version
,
device_id
):
print
(
"fgx"
)
print
(
"fgx"
)
...
@@ -66,10 +79,13 @@ class janus_request(BaseRequest):
...
@@ -66,10 +79,13 @@ class janus_request(BaseRequest):
return
self
.
api_send
(
self
.
data
[
"tag_service"
])
return
self
.
api_send
(
self
.
data
[
"tag_service"
])
if
__name__
==
'__main__'
:
if
__name__
==
'__main__'
:
#打印购物车-猜你喜欢列表接口返回
#打印购物车-猜你喜欢列表接口返回
print
(
janus_request
()
.
mine_guess_you_like
())
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
(
janus_request
()
.
tag_service
())
...
...
all_backend_api/janus_request.yaml
View file @
8daadceb
...
@@ -37,6 +37,27 @@ mine_guess_you_like:
...
@@ -37,6 +37,27 @@ mine_guess_you_like:
json
:
{}
json
:
{}
isLogin
:
1
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
:
tag_service
:
method
:
GET
method
:
GET
...
...
all_backend_api/service_request.py
View file @
8daadceb
...
@@ -11,6 +11,13 @@ class service_request(BaseRequest):
...
@@ -11,6 +11,13 @@ class service_request(BaseRequest):
return
self
.
api_send
(
self
.
data
[
"home_v5"
])
return
self
.
api_send
(
self
.
data
[
"home_v5"
])
#商祥页-收藏
def
service_favor
(
self
):
return
self
.
api_send
(
self
.
data
[
"service_favor"
])
if
__name__
==
'__main__'
:
if
__name__
==
'__main__'
:
print
(
service_request
()
.
home_v5
())
print
(
service_request
()
.
home_v5
())
#打印商祥页-收藏接口返回
print
(
service_request
()
.
service_favor
())
\ No newline at end of file
all_backend_api/service_request.yaml
View file @
8daadceb
...
@@ -6,3 +6,13 @@ home_v5:
...
@@ -6,3 +6,13 @@ home_v5:
data
:
{}
data
:
{}
json
:
{}
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 @
8daadceb
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 @
8daadceb
#商祥页-分享
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 @
8daadceb
...
@@ -127,6 +127,16 @@ UNREAD = os.path.join(BASE_DIR, "backend_auto/test_backend_data/notification_dat
...
@@ -127,6 +127,16 @@ 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"
)
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
#捜索结果页-医生/医院tab
CONTENTV6_CONFIG
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/all_backend_api"
,
"search_request.yaml"
)
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"
)
CONTENTV6
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_backend_data/search_data"
,
"content_v6.yaml"
)
...
...
test_backend_case/janus_case/test_product_detail.py
0 → 100644
View file @
8daadceb
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 @
8daadceb
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/service_case/test_service_favor.py
0 → 100644
View file @
8daadceb
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 @
8daadceb
test_backend_case/services_case/test_share_data.py
0 → 100644
View file @
8daadceb
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/janus_data/product_detail.yaml
0 → 100644
View file @
8daadceb
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 @
8daadceb
sku_info
:
-
case
:
"
校验接口返回成功case"
service_id
:
"
5857263"
service_item_id
:
"
618788"
assert_error
:
0
\ No newline at end of file
test_backend_data/service_data/service_favor.yaml
0 → 100644
View file @
8daadceb
service_favor
:
-
case
:
"
校验收藏成功case"
assert_message
:
"
收藏成功"
\ No newline at end of file
test_backend_data/services_data/__init__.py
0 → 100644
View file @
8daadceb
test_backend_data/services_data/share_data.yaml
0 → 100644
View file @
8daadceb
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