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
1782e7ab
Commit
1782e7ab
authored
Apr 22, 2021
by
张伟男
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
AI
parent
f5dad9ce
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
13 additions
and
10 deletions
+13
-10
test_recomend_services.py
test_backend_case/oneimage_case/test_recomend_services.py
+6
-1
test_share_v4.py
test_backend_case/oneimage_case/test_share_v4.py
+1
-3
recomend_services.yaml
test_backend_data/oneimage_data/recomend_services.yaml
+5
-5
share_v4.yaml
test_backend_data/oneimage_data/share_v4.yaml
+1
-1
No files found.
test_backend_case/oneimage_case/test_recomend_services.py
View file @
1782e7ab
...
@@ -14,6 +14,11 @@ class TestRecomendServices:
...
@@ -14,6 +14,11 @@ class TestRecomendServices:
@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"
])
assert
r
[
"error"
]
==
param
[
"assert"
]
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
View file @
1782e7ab
...
@@ -17,8 +17,6 @@ class TestShareV4:
...
@@ -17,8 +17,6 @@ class TestShareV4:
@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"
])
if
r
[
"error"
]
==
0
:
assert
r
[
"error"
]
==
0
data
=
r
.
get
(
"data"
)
assert
1
==
1
test_backend_data/oneimage_data/recomend_services.yaml
View file @
1782e7ab
recomend_services
:
recomend_services
:
#
成功登录case
#
测颜值根据五官推荐美购
-
-
case
:
"
请求成功,
有数据返回
"
case
:
"
请求成功,
返回个数正确
"
version
:
"
7.42.2"
version
:
"
7.42.2"
business_tags_names
:
'
[[],[],["玻尿酸垫下巴","自体脂肪垫下巴","硅胶垫下巴","膨体垫下巴"],["半永久纹眉","植眉"],["玻尿酸丰唇","胶原蛋白填充丰唇","自体脂肪丰唇"],[],["开内眼角"],["射频提升","热拉提","热拉提plus","热玛吉","超声提升"],["热玛吉"],[],["注射瘦脸","激光溶脂瘦脸","取颊脂垫瘦脸","光纤溶脂瘦脸","下颌角整形"]]'
business_tags_names
:
'
[["玻尿酸垫下巴","自体脂肪垫下巴","硅胶垫下巴","膨体垫下巴"],["半永久纹眉","植眉"]]'
assert
:
0
assert
:
2
\ No newline at end of file
\ No newline at end of file
test_backend_data/oneimage_data/share_v4.yaml
View file @
1782e7ab
share_v4
:
share_v4
:
#
成功登录case
#
测颜值结果
-
-
case
:
"
请求成功,有数据返回"
case
:
"
请求成功,有数据返回"
version
:
"
7.42.2"
version
:
"
7.42.2"
...
...
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