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
3fdea3d4
Commit
3fdea3d4
authored
Jun 18, 2021
by
张淑琴
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
已上线服务订单详情校验
parent
a045fbea
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
62 additions
and
6 deletions
+62
-6
web_request.py
all_doctor_api/web_request.py
+10
-5
web_request.yaml
all_doctor_api/web_request.yaml
+10
-0
path_setting.py
path_setting.py
+2
-0
test_artemis_order_id_detail.py
test_doctor_case/web_case/test_artemis_order_id_detail.py
+24
-0
test_artemis_order_list.py
test_doctor_case/web_case/test_artemis_order_list.py
+1
-1
artemis_order_id_detail.yaml
test_doctor_data/web_data/artemis_order_id_detail.yaml
+6
-0
artemis_order_list.yaml
test_doctor_data/web_data/artemis_order_list.yaml
+9
-0
No files found.
all_doctor_api/web_request.py
View file @
3fdea3d4
...
...
@@ -65,9 +65,13 @@ class web_request(BaseRequest):
return
self
.
api_send
(
self
.
ACCOUNT_URL
[
"cpc_homepage"
])
def
artemis_ad_type_list
(
self
):
return
self
.
api_send
(
self
.
ACCOUNT_URL
[
"artemis_ad_type_list"
])
def
artemis_order_list
(
self
,
status
):
def
artemis_order_list
(
self
,
status
,
page
):
self
.
params
[
"status"
]
=
status
self
.
params
[
"page"
]
=
page
return
self
.
api_send
(
self
.
ACCOUNT_URL
[
"artemis_order_list"
])
def
artemis_order_id_detail
(
self
):
"上线中订单详情页"
return
self
.
api_send
(
self
.
ACCOUNT_URL
[
"artemis_order_id_detail"
])
...
...
@@ -89,6 +93,7 @@ if __name__ == '__main__':
print
(
web_request
()
.
cpc_homepage
())
print
(
web_request
()
.
artemis_ad_type_list
())
print
(
"发送"
)
print
(
web_request
()
.
artemis_order_list
(
0
))
print
(
web_request
()
.
artemis_order_list
(
1
))
print
(
web_request
()
.
artemis_order_list
(
2
))
\ No newline at end of file
print
(
web_request
()
.
artemis_order_list
(
0
,
1
))
print
(
web_request
()
.
artemis_order_list
(
1
,
1
))
print
(
web_request
()
.
artemis_order_list
(
2
,
1
))
print
(
web_request
()
.
artemis_order_id_detail
())
\ No newline at end of file
all_doctor_api/web_request.yaml
View file @
3fdea3d4
...
...
@@ -142,6 +142,15 @@ artemis_order_list:
url
:
/api/web/artemis/order/list
params
:
status
:
${status}
page
:
${page}
data
:
{}
json
:
{}
isLogin
:
1
#需要登录
artemis_order_id_detail
:
method
:
get
url
:
/api/web/artemis/order/509151034657/detail
params
:
{}
data
:
{}
json
:
{}
isLogin
:
1
#需要登录
\ No newline at end of file
path_setting.py
View file @
3fdea3d4
...
...
@@ -392,6 +392,8 @@ ADTYPELIST=os.path.join(BASE_DIR, "backend_auto/test_doctor_data/web_data", "art
ADADDSHOPPINGCARTINFO
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_doctor_data/web2_data"
,
"artemis_ad_add_shopping_cart_info.yaml"
)
#医生后台-我的服务订单
ORDERLIST
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_doctor_data/web_data"
,
"artemis_order_list.yaml"
)
#医生后台-我的服务订单-已上线订单
ORDERIDDETAIL
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_doctor_data/web_data"
,
"artemis_order_id_detail.yaml"
)
#医生后台-点点通商品-概览
CPCHOMEPAGE
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_doctor_data/web_data"
,
"cpc_homepage.yaml"
)
...
...
test_doctor_case/web_case/test_artemis_order_id_detail.py
0 → 100644
View file @
3fdea3d4
import
pytest
from
ids_list
import
get_ids
import
path_setting
from
in_common.base_request
import
BaseRequest
from
all_doctor_api.web_request
import
web_request
class
TestArtemisOrderIdDetail
:
data
=
BaseRequest
()
.
api_load
(
path_setting
.
ORDERIDDETAIL
)
orderiddetail_case
,
orderiddetail_data
=
get_ids
(
data
,
"artemis_order_id_detail"
)
@pytest.mark.parametrize
(
"param"
,
orderiddetail_data
,
ids
=
orderiddetail_case
)
def
test_artemis_order_id_detail
(
self
,
param
):
'''我的服务订单'''
r
=
web_request
()
.
artemis_order_id_detail
()
if
r
[
"error"
]
==
0
:
assert
r
[
"data"
][
"detail_type"
]
==
param
[
"assert_detail_type"
]
assert
r
[
"data"
][
"status"
]
==
param
[
"assert_status"
]
test_doctor_case/web_case/test_artemis_order_list.py
View file @
3fdea3d4
...
...
@@ -14,7 +14,7 @@ class TestArtemisOrderList:
@pytest.mark.parametrize
(
"param"
,
orderlist_data
,
ids
=
orderlist_case
)
def
test_artemis_order_list
(
self
,
param
):
'''我的服务订单'''
r
=
web_request
()
.
artemis_order_list
(
param
[
"status"
])
r
=
web_request
()
.
artemis_order_list
(
param
[
"status"
]
,
param
[
"page"
]
)
if
r
[
"error"
]
==
0
:
orders
=
r
.
get
(
"data"
)
.
get
(
"orders"
,
[])
assert
len
(
orders
)
>=
param
[
"assert"
]
...
...
test_doctor_data/web_data/artemis_order_id_detail.yaml
0 → 100644
View file @
3fdea3d4
artemis_order_id_detail
:
#已上线订单服务订单详情页case
-
case
:
"
已上线订单服务订单详情页case"
assert_status
:
3
assert_detail_type
:
6
test_doctor_data/web_data/artemis_order_list.yaml
View file @
3fdea3d4
...
...
@@ -3,36 +3,45 @@ artemis_order_list:
-
case
:
"
我的服务订单请求失败case"
status
:
"
"
page
:
1
assert
:
0
-
case
:
"
我的服务订单-待支付广告包case"
status
:
0
page
:
1
assert
:
0
-
case
:
"
我的服务订单-已购买case"
status
:
1
page
:
1
assert
:
0
-
case
:
"
我的服务订单-待审核case"
status
:
2
page
:
1
assert
:
0
-
case
:
"
我的服务订单-待上线case"
status
:
3
page
:
1
assert
:
0
-
case
:
"
我的服务订单-上线中case"
status
:
4
page
:
1
assert
:
0
-
case
:
"
我的服务订单-已下线case"
status
:
5
page
:
1
assert
:
0
-
case
:
"
我的服务订单-已支付广告包case"
status
:
6
page
:
1
assert
:
0
-
case
:
"
我的服务订单-已关闭广告包case"
status
:
7
page
:
1
assert
:
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