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
296c1e5e
Commit
296c1e5e
authored
Jun 10, 2021
by
aha
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'common_dev' into cuixin_dev
parents
4bc23e39
4588cfce
Hide whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
167 additions
and
4 deletions
+167
-4
janus_request.py
all_backend_api/janus_request.py
+8
-1
janus_request.yaml
all_backend_api/janus_request.yaml
+8
-1
orders_request.py
all_backend_api/orders_request.py
+22
-0
orders_request.yaml
all_backend_api/orders_request.yaml
+8
-0
host.yaml
host.yaml
+0
-1
base_request.py
in_common/base_request.py
+1
-0
login_session_function.py
login_session_function.py
+2
-1
login_session_function.yaml
login_session_function.yaml
+10
-0
path_setting.py
path_setting.py
+6
-0
test_product_my_list.py
test_backend_case/janus_case/test_product_my_list.py
+23
-0
__init__.py
test_backend_case/orders_case/__init__.py
+0
-0
test_orders_my_v2_waituse.py
test_backend_case/orders_case/test_orders_my_v2_waituse.py
+47
-0
product_my_list.yaml
test_backend_data/janus_data/product_my_list.yaml
+16
-0
__init__.py
test_backend_data/orders_data/__init__.py
+0
-0
my_v2.yaml
test_backend_data/orders_data/my_v2.yaml
+16
-0
No files found.
all_backend_api/janus_request.py
View file @
296c1e5e
...
@@ -104,6 +104,12 @@ class janus_request(BaseRequest):
...
@@ -104,6 +104,12 @@ class janus_request(BaseRequest):
return
self
.
api_send
(
self
.
data
[
'keyword_tip'
])
return
self
.
api_send
(
self
.
data
[
'keyword_tip'
])
# 新版本我的美券列表
def
product_my_list
(
self
,
start_num
,
tab_id
):
self
.
params
[
'start_num'
]
=
start_num
self
.
params
[
'tab_id'
]
=
tab_id
return
self
.
api_send
(
self
.
data
[
'coupon_my_list'
])
if
__name__
==
'__main__'
:
if
__name__
==
'__main__'
:
#打印购物车-猜你喜欢列表接口返回
#打印购物车-猜你喜欢列表接口返回
...
@@ -121,4 +127,4 @@ if __name__ == '__main__':
...
@@ -121,4 +127,4 @@ if __name__ == '__main__':
print
(
janus_request
()
.
polymer
())
print
(
janus_request
()
.
polymer
())
print
(
"fgx"
)
print
(
"fgx"
)
print
(
janus_request
()
.
product_my_list
(
0
,
0
))
\ No newline at end of file
all_backend_api/janus_request.yaml
View file @
296c1e5e
...
@@ -98,6 +98,13 @@ keyword_tip:
...
@@ -98,6 +98,13 @@ keyword_tip:
#新版本我的美券
coupon_my_list
:
method
:
get
url
:
/api/janus/product/coupon/my_list
params
:
start_num
:
${start_num}
tab_id
:
${tab_id}
isLogin
:
1
all_backend_api/orders_request.py
0 → 100644
View file @
296c1e5e
import
path_setting
from
in_common.base_request
import
BaseRequest
class
orders_request
(
BaseRequest
):
def
__init__
(
self
):
self
.
data
=
self
.
api_load
(
path_setting
.
ORDERS_MY_V2_CONFIG
)
# 我的订单列表
def
my_v2
(
self
,
start_num
,
status
,
version
):
self
.
params
[
"start_num"
]
=
start_num
self
.
params
[
"status"
]
=
status
self
.
params
[
"version"
]
=
version
return
self
.
api_send
(
self
.
data
[
"my_v2"
])
if
__name__
==
'__main__'
:
print
(
orders_request
()
.
my_v2
(
0
,
1
,
"7.44.0"
))
all_backend_api/orders_request.yaml
0 → 100644
View file @
296c1e5e
my_v2
:
method
:
get
url
:
/api/orders/my/v2
params
:
start_num
:
${start_num}
status
:
${status}
version
:
${version}
isLogin
:
1
host.yaml
View file @
296c1e5e
develop_host
:
develop_host
:
backend
:
http://backend.paas-develop.env
backend
:
http://backend.paas-develop.env
# doctor: http://doctor.paas-develop.env
doctor
:
http://doctor.paas-develop.env
doctor
:
http://doctor.paas-develop.env
# backend: https://backend.igengmei.com
# backend: https://backend.igengmei.com
in_common/base_request.py
View file @
296c1e5e
...
@@ -69,6 +69,7 @@ class BaseRequest:
...
@@ -69,6 +69,7 @@ class BaseRequest:
# headers=user_headers,
# headers=user_headers,
data
=
req
.
get
(
'data'
),
data
=
req
.
get
(
'data'
),
json
=
req
.
get
(
'json'
),
json
=
req
.
get
(
'json'
),
# verify=False
# proxies={"http":"172.30.9.226:8888"}
# proxies={"http":"172.30.9.226:8888"}
)
)
...
...
login_session_function.py
View file @
296c1e5e
...
@@ -31,7 +31,8 @@ class LoginFunction:
...
@@ -31,7 +31,8 @@ class LoginFunction:
url
=
url
,
url
=
url
,
params
=
self
.
params
[
"backend_login"
][
"params"
],
params
=
self
.
params
[
"backend_login"
][
"params"
],
data
=
self
.
params
[
"backend_login"
][
"data"
],
data
=
self
.
params
[
"backend_login"
][
"data"
],
headers
=
{
'Connection'
:
'close'
}
headers
=
{
'Connection'
:
'close'
},
# verify=False
)
)
return
s
return
s
...
...
login_session_function.yaml
View file @
296c1e5e
...
@@ -9,6 +9,16 @@ backend_login:
...
@@ -9,6 +9,16 @@ backend_login:
vfc_type
:
vfc_type
:
face_token
:
face_token
:
#backend_login:
# method: POST
# url: /api/accounts/login/password
# params:
# current_city_id: "beijing"
# data:
# phone: "+8618646292152"
# password: 111111
doctor_login
:
doctor_login
:
method
:
post
method
:
post
url
:
/api/web/account/login
url
:
/api/web/account/login
...
...
path_setting.py
View file @
296c1e5e
...
@@ -96,6 +96,12 @@ EYELIDS_DIARY_CARDS_DATA = os.path.join(BASE_DIR, "backend_auto/test_backend_dat
...
@@ -96,6 +96,12 @@ EYELIDS_DIARY_CARDS_DATA = os.path.join(BASE_DIR, "backend_auto/test_backend_dat
GMAI_PLASTIC_ANALYSIS_V3_DATA
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_backend_data/gmai_data"
,
"plastic_analysis_v3.yaml"
)
GMAI_PLASTIC_ANALYSIS_V3_DATA
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_backend_data/gmai_data"
,
"plastic_analysis_v3.yaml"
)
# 3D变脸
# 3D变脸
GMAI_PLASTIC_ANALYSIS_V2_DATA
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_backend_data/gmai_data"
,
"plastic_analysis_v2.yaml"
)
GMAI_PLASTIC_ANALYSIS_V2_DATA
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_backend_data/gmai_data"
,
"plastic_analysis_v2.yaml"
)
# 新版本我的美券列表
JANUS_PRODUCT_MY_LIST_DATA
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_backend_data/janus_data"
,
"product_my_list.yaml"
)
# 我的订单列表
ORDERS_MY_V2_CONFIG
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/all_backend_api"
,
"orders_request.yaml"
)
# 订单列表
ORDERS_MY_V2_DATA
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_backend_data/orders_data"
,
"my_v2.yaml"
)
LOGIN_PASSWD
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_backend_data/accounts_data"
,
"login_passwd.yaml"
)
LOGIN_PASSWD
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_backend_data/accounts_data"
,
"login_passwd.yaml"
)
...
...
test_backend_case/janus_case/test_product_my_list.py
0 → 100644
View file @
296c1e5e
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
TestProductMyLiSt
:
data
=
BaseRequest
()
.
api_load
(
path_setting
.
JANUS_PRODUCT_MY_LIST_DATA
)
product_my_list_detail_case
,
product_my_list_detail_data
=
get_ids
(
data
,
"product_my_list"
)
@pytest.mark.parametrize
(
"param"
,
product_my_list_detail_data
,
ids
=
product_my_list_detail_case
)
def
test_product_my_list
(
self
,
param
):
r
=
janus_request
()
.
product_my_list
(
param
[
"start_num"
],
param
[
"tab_id"
])
assert
r
[
"error"
]
==
0
coupon_list
=
r
[
"data"
][
"coupon_list"
]
print
(
len
(
coupon_list
))
assert
0
<=
len
(
coupon_list
)
<=
20
if
len
(
coupon_list
)
<
10
:
assert
r
[
"data"
][
"no_more_data"
]
is
True
test_backend_case/orders_case/__init__.py
0 → 100644
View file @
296c1e5e
test_backend_case/orders_case/test_orders_my_v2_waituse.py
0 → 100644
View file @
296c1e5e
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
TestOrdersMyV2Waituse
:
data
=
BaseRequest
()
.
api_load
(
path_setting
.
ORDERS_MY_V2_DATA
)
my_order_waituse_case
,
my_order_waituse_data
=
get_ids
(
data
,
"waituse"
)
@pytest.mark.parametrize
(
"param"
,
my_order_waituse_data
,
ids
=
my_order_waituse_case
)
def
test_orders_waituse
(
self
,
param
):
r
=
orders_request
()
.
my_v2
(
param
[
"start_num"
],
param
[
"status"
],
param
[
"version"
])
if
r
[
"error"
]
==
0
:
orders
=
r
[
"data"
][
"orders"
]
for
order
in
orders
:
# 这个是次卡
if
order
[
"type"
]
==
4
:
# 订单信息
order_id
=
order
[
"order"
][
"order_id"
]
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
)
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
)
# 按钮信息,预约
beauty_card_payment_order_wait_used_title
=
order
[
"buttons"
][
0
][
"title"
]
beauty_card_payment_order_wait_used_url
=
order
[
"buttons"
][
0
][
"url"
]
assert
beauty_card_payment_order_wait_used_title
==
param
[
"beauty_card_button_title"
]
assert
beauty_card_payment_order_wait_used_url
==
param
[
"beauty_card_button_gmurl"
]
.
format
(
order_id
)
# 7.44.0加的领取面膜按钮
beauty_card_free_service_title
=
order
[
"buttons"
][
1
][
"title"
]
assert
beauty_card_free_service_title
==
param
[
"beauty_card_button_mianmo_title"
]
# 普通美购订单
if
order
[
"type"
]
==
0
:
# 订单信息
order_id
=
order
[
"order"
][
"order_id"
]
order_status
=
order
[
"order"
][
"order_status"
][
"status"
]
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
)
test_backend_data/janus_data/product_my_list.yaml
0 → 100644
View file @
296c1e5e
product_my_list
:
-
case
:
"
未使用美券列表"
start_num
:
0
tab_id
:
0
-
case
:
"
已使用美券列表"
start_num
:
0
tab_id
:
1
-
case
:
"
已过期"
start_num
:
0
tab_id
:
2
\ No newline at end of file
test_backend_data/orders_data/__init__.py
0 → 100644
View file @
296c1e5e
test_backend_data/orders_data/my_v2.yaml
0 → 100644
View file @
296c1e5e
waituse
:
#待使用
-
case
:
"
待使用tab"
start_num
:
0
status
:
1
version
:
"
7.44.0"
beauty_card_order_status
:
4
beauty_card_order_statust
:
"
待使用"
beauty_card_order_gmurl
:
"
gengmei://order_beauty_card_detail?order_id={}&type=4"
beauty_card_button_title
:
"
预约服务"
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
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