Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
O
on_line_product
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
邓莹莹
on_line_product
Commits
373689b4
Commit
373689b4
authored
Jul 23, 2021
by
邓莹莹
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
提交下单流程监控
parent
1b67b1be
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
112 additions
and
69 deletions
+112
-69
.gitignore
.gitignore
+2
-1
pay_request.yaml
all_backend_api/pay_request.yaml
+32
-32
settlement_request.py
all_backend_api/settlement_request.py
+2
-4
settlement_request.yaml
all_backend_api/settlement_request.yaml
+28
-31
login_session_function.yaml
login_session_function.yaml
+1
-1
path_setting.py
path_setting.py
+3
-0
__init__.py
test_backend_case/package_process_case/__init__.py
+0
-0
test_order_process.py
test_backend_case/package_process_case/test_order_process.py
+34
-0
__init__.py
test_backend_data/package_process_data/__init__.py
+0
-0
order_process.yaml
test_backend_data/package_process_data/order_process.yaml
+10
-0
No files found.
.gitignore
View file @
373689b4
...
@@ -104,6 +104,6 @@ venv.bak/
...
@@ -104,6 +104,6 @@ venv.bak/
# mypy
# mypy
.mypy_cache/
.mypy_cache/
host.yaml
.DS_Store
.DS_Store
*/.DS_Store
*/.DS_Store
\ No newline at end of file
all_backend_api/pay_request.yaml
View file @
373689b4
#
wechat_prepay:
wechat_prepay
:
#
method: post
method
:
post
#
url: /pay/wechat/prepay
url
:
/pay/wechat/prepay
#
params:
params
:
#
current_city_id: "beijing"
current_city_id
:
"
beijing"
#
version: 7.44.0
version
:
7.44.0
#
data:
data
:
#
settlement_id: ${settlement_id}
settlement_id
:
${settlement_id}
#
isLogin: 1
isLogin
:
1
#
#
alipay_prepay:
alipay_prepay
:
#
method: post
method
:
post
#
url: /pay/alipay/prepay
url
:
/pay/alipay/prepay
#
params:
params
:
#
current_city_id: "beijing"
current_city_id
:
"
beijing"
#
version: 7.44.0
version
:
7.44.0
#
data:
data
:
#
settlement_id: ${settlement_id}
settlement_id
:
${settlement_id}
#
version: ${version}
version
:
${version}
#
is_huabei: ${is_huabei}
is_huabei
:
${is_huabei}
#
huabei_period: ${huabei_period}
huabei_period
:
${huabei_period}
#
isLogin: 1
isLogin
:
1
#
#
jump:
jump
:
#
method: post
method
:
post
#
url: /pay/jump
url
:
/pay/jump
#
params:
params
:
#
current_city_id: "beijing"
current_city_id
:
"
beijing"
#
version: 7.44.0
version
:
7.44.0
#
data:
data
:
#
settlement_id: ${settlement_id}
settlement_id
:
${settlement_id}
#
isLogin: 1
isLogin
:
1
all_backend_api/settlement_request.py
View file @
373689b4
...
@@ -22,15 +22,13 @@ class settlement_request(BaseRequest):
...
@@ -22,15 +22,13 @@ class settlement_request(BaseRequest):
self
.
params
[
"mul_orders_number"
]
=
mul_orders_number
self
.
params
[
"mul_orders_number"
]
=
mul_orders_number
return
self
.
api_send
(
self
.
preview
[
"pay_v1"
])
return
self
.
api_send
(
self
.
preview
[
"pay_v1"
])
def
create_v1
(
self
,
service_item_id
,
number
,
platform_coupon_id
,
use_point
,
is_doctor_see
,
doctor_coupon_id
,
insurance_info
,
is_create_groupbuy
):
def
create_v1
(
self
,
service_item_id
,
number
,
use_point
,
is_doctor_see
,
is_create_groupbuy
,
phone
):
self
.
params
[
"service_item_id"
]
=
service_item_id
self
.
params
[
"service_item_id"
]
=
service_item_id
self
.
params
[
"number"
]
=
number
self
.
params
[
"number"
]
=
number
self
.
params
[
"platform_coupon_id"
]
=
platform_coupon_id
self
.
params
[
"use_point"
]
=
use_point
self
.
params
[
"use_point"
]
=
use_point
self
.
params
[
"is_doctor_see"
]
=
is_doctor_see
self
.
params
[
"is_doctor_see"
]
=
is_doctor_see
self
.
params
[
"doctor_coupon_id"
]
=
doctor_coupon_id
self
.
params
[
"insurance_info"
]
=
insurance_info
self
.
params
[
"is_create_groupbuy"
]
=
is_create_groupbuy
self
.
params
[
"is_create_groupbuy"
]
=
is_create_groupbuy
self
.
params
[
"phone"
]
=
phone
return
self
.
api_send
(
self
.
preview
[
"create_v1"
])
return
self
.
api_send
(
self
.
preview
[
"create_v1"
])
def
pay
(
self
,
id
):
def
pay
(
self
,
id
):
...
...
all_backend_api/settlement_request.yaml
View file @
373689b4
#
preview_v1:
preview_v1
:
#
method: post
method
:
post
#
url: /api/settlement/preview/v1
url
:
/api/settlement/preview/v1
#
params:
params
:
#
current_city_id: ${current_city_id}
current_city_id
:
${current_city_id}
#
data:
data
:
#
service_item_id: ${service_item_id}
service_item_id
:
${service_item_id}
#
number: ${number}
number
:
${number}
#
use_platform_coupon: ${use_platform_coupon}
use_platform_coupon
:
${use_platform_coupon}
#
use_doctor_coupon: ${use_doctor_coupon}
use_doctor_coupon
:
${use_doctor_coupon}
#
use_coupon_grey: ${use_coupon_grey}
use_coupon_grey
:
${use_coupon_grey}
#
is_create_groupbuy: ${is_create_groupbuy}
is_create_groupbuy
:
${is_create_groupbuy}
#
json: {}
json
:
{}
#
isLogin: 1 #需要登录添加这个字段,值为1 0是不需要登录的情况,如不需要登录,可以不添加这个字段
isLogin
:
1
#需要登录添加这个字段,值为1 0是不需要登录的情况,如不需要登录,可以不添加这个字段
pay_v1
:
pay_v1
:
method
:
get
method
:
get
...
@@ -26,23 +26,20 @@ pay_v1:
...
@@ -26,23 +26,20 @@ pay_v1:
json
:
{}
json
:
{}
isLogin
:
1
isLogin
:
1
#create_v1:
create_v1
:
# method: post
method
:
post
# url: /api/settlement/create/v1
url
:
/api/settlement/create/v1
# params:
params
:
# current_city_id: "beijing"
current_city_id
:
"
beijing"
# version: 7.44.0
version
:
7.44.0
# data:
data
:
# service_item_id: ${service_item_id}
service_item_id
:
${service_item_id}
# number: ${number}
number
:
${number}
# phone: "18301089978"
phone
:
${phone}
# platform_coupon_id: ${platform_coupon_id}
use_point
:
${use_point}
# use_point: ${use_point}
is_doctor_see
:
${is_doctor_see}
# is_doctor_see: ${is_doctor_see}
is_create_groupbuy
:
${is_create_groupbuy}
# doctor_coupon_id: ${doctor_coupon_id}
isLogin
:
1
# insurance_info: ${insurance_info}
# is_create_groupbuy: ${is_create_groupbuy}
# isLogin: 1
pay
:
pay
:
method
:
get
method
:
get
...
...
login_session_function.yaml
View file @
373689b4
...
@@ -4,7 +4,7 @@ backend_login:
...
@@ -4,7 +4,7 @@ backend_login:
params
:
params
:
current_city_id
:
"
beijing"
current_city_id
:
"
beijing"
data
:
data
:
phone
:
"
1
8301089928
"
phone
:
"
1
2345654321
"
password
:
123456
password
:
123456
lng
:
116.4879672787569
lng
:
116.4879672787569
lat
:
39.98338452087316
lat
:
39.98338452087316
...
...
path_setting.py
View file @
373689b4
...
@@ -524,5 +524,8 @@ FREE_RECRUIT_LIST = os.path.join(BASE_DIR, "on_line_product/test_backend_data/fe
...
@@ -524,5 +524,8 @@ FREE_RECRUIT_LIST = os.path.join(BASE_DIR, "on_line_product/test_backend_data/fe
PAGE_RULES_CONFIG
=
os
.
path
.
join
(
BASE_DIR
,
"on_line_product/all_backend_api"
,
"janus_request.yaml"
)
PAGE_RULES_CONFIG
=
os
.
path
.
join
(
BASE_DIR
,
"on_line_product/all_backend_api"
,
"janus_request.yaml"
)
PAGE_RULES
=
os
.
path
.
join
(
BASE_DIR
,
"on_line_product/test_backend_data/janus_data"
,
"page_rules.yaml"
)
PAGE_RULES
=
os
.
path
.
join
(
BASE_DIR
,
"on_line_product/test_backend_data/janus_data"
,
"page_rules.yaml"
)
#美购下单流程数据
ORDER_PROCESS_DATA
=
os
.
path
.
join
(
BASE_DIR
,
"on_line_product/test_backend_data/package_process_data"
,
"order_process.yaml"
)
if
__name__
==
'__main__'
:
if
__name__
==
'__main__'
:
print
(
"=========="
,
LIVEYAML_CONFIG
)
print
(
"=========="
,
LIVEYAML_CONFIG
)
test_backend_case/package_process_case/__init__.py
0 → 100644
View file @
373689b4
test_backend_case/package_process_case/test_order_process.py
0 → 100644
View file @
373689b4
import
pytest
from
ids_list
import
get_ids
import
path_setting
from
in_common.base_request
import
BaseRequest
from
all_backend_api.settlement_request
import
settlement_request
from
all_backend_api.pay_request
import
pay_request
class
TestOrderProcess
:
data
=
BaseRequest
()
.
api_load
(
path_setting
.
ORDER_PROCESS_DATA
)
order_process_case
,
order_process_data
=
get_ids
(
data
,
"order_process"
)
@pytest.mark.parametrize
(
"param"
,
order_process_data
,
ids
=
order_process_case
)
def
test_order_process
(
self
,
param
):
preview_v1
=
settlement_request
()
.
preview_v1
(
param
[
"current_city_id"
],
param
[
"service_item_id"
],
param
[
"number"
],
param
[
"use_platform_coupon"
],
param
[
"use_doctor_coupon"
],
param
[
"use_coupon_grey"
],
param
[
"is_create_groupbuy"
])
actual_pay
=
preview_v1
[
"data"
][
"pre_payment_total_price"
]
payment_final_price
=
preview_v1
[
"data"
][
"payment_final_price"
]
number
=
preview_v1
[
"data"
][
"services"
][
0
][
"number"
]
phone
=
preview_v1
[
"data"
][
"phone"
]
pay_v1
=
settlement_request
()
.
pay_v1
(
actual_pay
,
payment_final_price
,
0
,
0
)
use_point
=
0
is_doctor_see
=
0
is_create_groupbuy
=
0
create_v1
=
settlement_request
()
.
create_v1
(
param
[
"service_item_id"
],
number
,
use_point
,
is_doctor_see
,
is_create_groupbuy
,
phone
)
settlememt_id
=
create_v1
[
"data"
][
"id"
]
alipay_prepay
=
pay_request
()
.
alipay_prepay
(
settlememt_id
,
"v1"
,
0
,
0
)
jump
=
pay_request
()
.
jump
(
settlememt_id
)
assert
jump
[
"error"
]
==
0
assert
alipay_prepay
[
"error"
]
==
0
# print("0000000000000000",r)
test_backend_data/package_process_data/__init__.py
0 → 100644
View file @
373689b4
test_backend_data/package_process_data/order_process.yaml
0 → 100644
View file @
373689b4
order_process
:
-
case
:
"
下单流程监控"
current_city_id
:
"
beijing"
service_item_id
:
726795
number
:
1
use_platform_coupon
:
1
use_doctor_coupon
:
1
use_coupon_grey
:
"
true"
is_create_groupbuy
:
0
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