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
c95b57d7
Commit
c95b57d7
authored
Jul 23, 2021
by
张伟男
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
AI,beautycard
parent
c000a00b
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
97 additions
and
8 deletions
+97
-8
test_simulate_analyze.py
test_backend_case/gmai_case/test_simulate_analyze.py
+3
-0
test_orders_my_v2_used.py
test_backend_case/orders_case/test_orders_my_v2_used.py
+43
-0
test_orders_my_v2_waituse.py
test_backend_case/orders_case/test_orders_my_v2_waituse.py
+21
-3
simulate_analyze.yaml
test_backend_data/gmai_data/simulate_analyze.yaml
+17
-2
my_v2.yaml
test_backend_data/orders_data/my_v2.yaml
+12
-2
topic_reply_create.yaml
test_backend_data/topic_data/topic_reply_create.yaml
+1
-1
No files found.
test_backend_case/gmai_case/test_simulate_analyze.py
View file @
c95b57d7
...
...
@@ -15,7 +15,9 @@ class TestSimulateAnalyze:
r
=
gmai_request
()
.
simulate_analyze
(
param
[
"device_id"
],
param
[
"image_url"
],
param
[
"style_id"
]
,
param
[
"type_id"
])
assert
r
[
"error"
]
==
0
gm_url
=
r
[
"data"
][
"plastic_image_url"
]
content
=
r
[
"data"
][
"content"
]
print
(
"效果图: "
,
gm_url
)
print
(
"效果文案: "
,
content
)
before_charm_val
=
r
[
"data"
][
"before_charm_val"
]
after_charm_val
=
r
[
"data"
][
"after_charm_val"
]
assert
before_charm_val
<
after_charm_val
\ No newline at end of file
test_backend_case/orders_case/test_orders_my_v2_used.py
0 → 100644
View file @
c95b57d7
import
pytest
from
ids_list
import
get_ids
import
path_setting
from
in_common.base_request
import
BaseRequest
from
all_backend_api.orders_request
import
orders_request
class
TestOrdersMyV2Used
:
data
=
BaseRequest
()
.
api_load
(
path_setting
.
ORDERS_MY_V2_DATA
)
my_order_used_case
,
my_order_used_data
=
get_ids
(
data
,
"used"
)
@pytest.mark.parametrize
(
"param"
,
my_order_used_data
,
ids
=
my_order_used_case
)
def
test_orders_used
(
self
,
param
):
no_more_data
=
False
i
=
0
found_usedBeautycard
=
False
while
no_more_data
is
False
:
r
=
orders_request
()
.
my_v2
(
i
*
10
,
param
[
"status"
],
param
[
"version"
])
i
+=
1
no_more_data
=
r
[
"data"
][
"no_more_data"
]
for
order
in
r
[
"data"
][
"orders"
]:
if
order
[
"type"
]
==
4
and
order
[
"order"
][
"order_status"
][
"status"
]
==
5
:
found_usedBeautycard
=
True
order_id
=
order
[
"order"
][
"order_id"
]
print
(
"次卡单id: "
,
order_id
)
# 按钮文案
text
=
order
[
"order"
][
"order_status"
][
"text"
]
assert
text
==
"已使用"
assert
order
[
"gm_url"
]
==
"gengmei://order_beauty_card_detail?order_id={}&type=4"
.
format
(
order_id
)
# 按钮信息
buttons_title
=
order
[
"buttons"
][
0
][
"title"
]
buttons_url
=
order
[
"buttons"
][
0
][
"url"
]
assert
buttons_title
==
"立即领取面膜"
assert
buttons_url
==
"gengmei://common_webview?url=https://backend.igengmei.com/phantom/visual_special/2340"
# 7.46.0加的头图信息
icon_url
=
order
[
"header"
][
"icon_url"
]
gm_url
=
order
[
"header"
][
"gm_url"
]
title
=
order
[
"header"
][
"title"
]
break
if
found_usedBeautycard
:
break
test_backend_case/orders_case/test_orders_my_v2_waituse.py
View file @
c95b57d7
...
...
@@ -23,7 +23,7 @@ class TestOrdersMyV2Waituse:
order_status
=
order
[
"order"
][
"order_status"
][
"status"
]
order_statust
=
order
[
"order"
][
"order_status"
][
"text"
]
gm_url
=
order
[
"gm_url"
]
print
(
order_id
,
order_status
,
order_statust
,
gm_url
)
#
print(order_id, order_status, order_statust, gm_url)
assert
order_status
==
param
[
"beauty_card_order_status"
]
assert
order_statust
==
param
[
"beauty_card_order_statust"
]
assert
gm_url
==
param
[
"beauty_card_order_gmurl"
]
.
format
(
order_id
)
...
...
@@ -35,6 +35,13 @@ class TestOrdersMyV2Waituse:
# 7.44.0加的领取面膜按钮
beauty_card_free_service_title
=
order
[
"buttons"
][
1
][
"title"
]
assert
beauty_card_free_service_title
==
param
[
"beauty_card_button_mianmo_title"
]
# 7.46.0加的头图信息
icon_url
=
order
[
"header"
][
"icon_url"
]
gm_url
=
order
[
"header"
][
"gm_url"
]
title
=
order
[
"header"
][
"title"
]
# print(icon_url, gm_url, title)
assert
icon_url
==
param
[
"beauty_card_header_icon"
]
assert
gm_url
not
in
(
None
,
""
)
# 普通美购订单
if
order
[
"type"
]
==
0
:
# 订单信息
...
...
@@ -43,5 +50,16 @@ class TestOrdersMyV2Waituse:
order_statust
=
order
[
"order"
][
"order_status"
][
"text"
]
assert
order_status
==
param
[
"putong_card_order_status"
]
assert
order_statust
==
param
[
"putong_card_order_statust"
]
print
(
order_status
,
order_statust
)
# print(order_status, order_statust)
# 医生的医院信息
doctor_hospital_id
=
order
[
"order"
][
"doctor_hospital_id"
]
# 7.46.0增加头图信息
xcx_url
=
order
[
"header"
][
"xcx_url"
]
icon_url
=
order
[
"header"
][
"icon_url"
]
gm_url
=
order
[
"header"
][
"gm_url"
]
title
=
order
[
"header"
][
"title"
]
print
(
xcx_url
,
icon_url
,
gm_url
,
title
)
assert
xcx_url
==
"/packageBusiness/pages/org/main?hospital_id={}"
.
format
(
doctor_hospital_id
)
assert
icon_url
is
not
""
assert
gm_url
==
"gengmei://organization_detail?organization_id={}"
.
format
(
doctor_hospital_id
)
assert
title
is
not
""
test_backend_data/gmai_data/simulate_analyze.yaml
View file @
c95b57d7
...
...
@@ -43,4 +43,19 @@ simulate_analyze:
device_id
:
"
869412032478155"
image_url
:
"
2021/06/07/1451/86b01d9a9d66"
style_id
:
2
type_id
:
8
\ No newline at end of file
type_id
:
8
#模拟口红
-
case
:
"
蜜桃粉口红效果"
device_id
:
"
androidid_7255c3398845cdd5"
image_url
:
"
2021/07/20/1431/9d8709706125"
style_id
:
1
type_id
:
10
-
case
:
"
复古红口红效果"
device_id
:
"
androidid_7255c3398845cdd5"
image_url
:
"
2021/07/20/1431/9d8709706125"
style_id
:
3
type_id
:
10
\ No newline at end of file
test_backend_data/orders_data/my_v2.yaml
View file @
c95b57d7
...
...
@@ -12,4 +12,14 @@ waituse:
beauty_card_button_gmurl
:
"
gengmei://order_beauty_card_reserve?order_id={}"
beauty_card_button_mianmo_title
:
"
立即领取面膜"
putong_card_order_status
:
"
1"
putong_card_order_statust
:
"
待使用"
\ No newline at end of file
putong_card_order_statust
:
"
待使用"
beauty_card_header_icon
:
"
https://heras.igengmei.com/2021/06/23/2fe8088602"
used
:
#已使用的次卡订单
-
case
:
"
全部tab下已使用的次卡订单"
start_num
:
0
status
:
-1
version
:
"
7.44.0"
\ No newline at end of file
test_backend_data/topic_data/topic_reply_create.yaml
View file @
c95b57d7
...
...
@@ -3,7 +3,7 @@ reply_create:
beuzhu
:
'
#
备注:
这个文件有冲突的话,那个版本都行不会影响,回退/接受当前版本都行,因为每次运行content都会改变'
case
:
日记贴一级评论创建--正常校验&创建二级评论--正常校验
channel
:
benzhan
content
:
ces测试+2021-07-1
4 18:15:39
content
:
ces测试+2021-07-1
6 16:30:24
message
:
请勿回复重复内容
message1
:
回复成功
message2
:
你的回复有点频繁,稍后再来
...
...
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