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
403e1677
Commit
403e1677
authored
Jun 18, 2021
by
张伟男
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
AI feed
parent
c00857cf
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
70 additions
and
4 deletions
+70
-4
face_request.py
all_backend_api/face_request.py
+14
-2
face_request.yaml
all_backend_api/face_request.yaml
+13
-2
path_setting.py
path_setting.py
+3
-0
test_plastic_feeds.py
test_backend_case/face_case/test_plastic_feeds.py
+22
-0
plastic_feeds.yaml
test_backend_data/face_data/plastic_feeds.yaml
+18
-0
No files found.
all_backend_api/face_request.py
View file @
403e1677
...
@@ -12,9 +12,20 @@ class face_request(BaseRequest):
...
@@ -12,9 +12,20 @@ class face_request(BaseRequest):
self
.
params
[
"facial_type2tag_names"
]
=
facial_type2tag_names
self
.
params
[
"facial_type2tag_names"
]
=
facial_type2tag_names
return
self
.
api_send
(
self
.
data
[
"face_diarys"
])
return
self
.
api_send
(
self
.
data
[
"face_diarys"
])
# 3D 底部feed流
def
plastic_feeds
(
self
,
tag_id
,
face_id
,
tag_id_list
,
page_size
,
version
):
self
.
params
[
"tag_id"
]
=
tag_id
self
.
params
[
"face_id"
]
=
face_id
self
.
params
[
"tag_id_list"
]
=
tag_id_list
self
.
params
[
"page_size"
]
=
page_size
self
.
params
[
"version"
]
=
version
return
self
.
api_send
(
self
.
data
[
"plastic_feeds"
])
if
__name__
==
'__main__'
:
if
__name__
==
'__main__'
:
facial_type2tag_names
=
'{"2":["玻尿酸垫下巴","自体脂肪垫下巴"],"3":["半永久纹眉","植眉"]}'
# facial_type2tag_names = '{"2":["玻尿酸垫下巴","自体脂肪垫下巴"],"3":["半永久纹眉","植眉"]}'
print
(
face_request
()
.
diarys_cards
(
facial_type2tag_names
))
# print(face_request().diarys_cards(facial_type2tag_names))
print
(
face_request
()
.
plastic_feeds
(
'2371,2372,2247,3032,2274,2277,2242,2348,2597,2318,2551,2341,2389'
,
9
,
'[[845, 498, 497, 494], [880, 484, 3254], [276], [1070, 373, 372, 350], [494, 315], [1293, 1050], [284, 282], [254, 251], [1000, 494, 312], [295, 272, 253], [1376, 1365, 1088, 892, 395, 385], [427, 327], [3214, 1377, 1306, 1051, 327, 229]]'
,
10
,
"7.44.0"
))
\ No newline at end of file
all_backend_api/face_request.yaml
View file @
403e1677
...
@@ -2,4 +2,15 @@ face_diarys:
...
@@ -2,4 +2,15 @@ face_diarys:
method
:
get
method
:
get
url
:
/api/face/diary/cards
url
:
/api/face/diary/cards
params
:
params
:
facial_type2tag_names
:
${facial_type2tag_names}
facial_type2tag_names
:
${facial_type2tag_names}
\ No newline at end of file
plastic_feeds
:
method
:
get
url
:
/api/face/plastic/feeds
params
:
tag_id
:
${tag_id}
face_id
:
${face_id}
tag_id_list
:
${tag_id_list}
page_size
:
${page_size}
version
:
${version}
\ No newline at end of file
path_setting.py
View file @
403e1677
...
@@ -162,6 +162,9 @@ XCX_GENGMEI_GET_WXACODE_UNLIMITED_DATA = os.path.join(BASE_DIR, "backend_auto/te
...
@@ -162,6 +162,9 @@ XCX_GENGMEI_GET_WXACODE_UNLIMITED_DATA = os.path.join(BASE_DIR, "backend_auto/te
# 测颜值根据标签召回日记
# 测颜值根据标签召回日记
FACE_DIARY_CARDS_CONFIG
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/all_backend_api"
,
"face_request.yaml"
)
FACE_DIARY_CARDS_CONFIG
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/all_backend_api"
,
"face_request.yaml"
)
FACE_DIARY_CARDS_DATA
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_backend_data/face_data"
,
"diary_cards.yaml"
)
FACE_DIARY_CARDS_DATA
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_backend_data/face_data"
,
"diary_cards.yaml"
)
# 3D变脸下feed流
FACE_PLASTIC_FEEDS_DATA
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_backend_data/face_data"
,
"plastic_feeds.yaml"
)
# 测颜值底部feed流
# 测颜值底部feed流
SCAN_DIARY_CARDS_CONFIG
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/all_backend_api"
,
"scan_request.yaml"
)
SCAN_DIARY_CARDS_CONFIG
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/all_backend_api"
,
"scan_request.yaml"
)
SCAN_DIARY_CARDS_DATA
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_backend_data/scan_data"
,
"diary_cards.yaml"
)
SCAN_DIARY_CARDS_DATA
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_backend_data/scan_data"
,
"diary_cards.yaml"
)
...
...
test_backend_case/face_case/test_plastic_feeds.py
0 → 100644
View file @
403e1677
import
pytest
from
ids_list
import
get_ids
import
path_setting
from
in_common.base_request
import
BaseRequest
from
all_backend_api.face_request
import
face_request
class
TestPlasticFeeds
:
data
=
BaseRequest
()
.
api_load
(
path_setting
.
FACE_PLASTIC_FEEDS_DATA
)
plasticfeeds_case
,
plasticfeeds_data
=
get_ids
(
data
,
"plastic_feeds"
)
@pytest.mark.skip
(
"跳过,高版本会转化标签,测试环境策略没有数据,线上正常"
)
@pytest.mark.parametrize
(
"param"
,
plasticfeeds_data
,
ids
=
plasticfeeds_case
)
def
test_plastic_feeds
(
self
,
param
):
r
=
face_request
()
.
plastic_feeds
(
param
[
"tag_id"
],
param
[
"face_id"
],
param
[
"tag_id_list"
],
param
[
"page_size"
],
param
[
"version"
])
if
r
[
"error"
]
==
0
:
features
=
r
[
"data"
][
"features"
]
assert
len
(
features
)
==
param
[
"assert_num"
]
test_backend_data/face_data/plastic_feeds.yaml
0 → 100644
View file @
403e1677
plastic_feeds
:
-
case
:
"
3D变脸下feed流(高版本)"
tag_id
:
'
2371,2372,2247,3032,2274,2277,2242,2348,2597,2318,2551,2341,2389'
face_id
:
9
tag_id_list
:
'
[[845,
498,
497,
494],
[880,
484,
3254],
[276],
[1070,
373,
372,
350],
[494,
315],
[1293,
1050],
[284,
282],
[254,
251],
[1000,
494,
312],
[295,
272,
253],
[1376,
1365,
1088,
892,
395,
385],
[427,
327],
[3214,
1377,
1306,
1051,
327,
229]]'
page_size
:
10
version
:
"
7.44.0"
assert_num
:
10
-
case
:
"
3D变脸下feed流(低版本)"
tag_id
:
'
2371,2372,2247,3032,2274,2277,2242,2348,2597,2318,2551,2341,2389'
face_id
:
9
tag_id_list
:
'
[[845,
498,
497,
494],
[880,
484,
3254],
[276],
[1070,
373,
372,
350],
[494,
315],
[1293,
1050],
[284,
282],
[254,
251],
[1000,
494,
312],
[295,
272,
253],
[1376,
1365,
1088,
892,
395,
385],
[427,
327],
[3214,
1377,
1306,
1051,
327,
229]]'
page_size
:
10
version
:
"
7.33.0"
assert_num
:
10
\ 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