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
15261c6c
Commit
15261c6c
authored
Jul 30, 2021
by
张淑琴
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
关联美购
parent
dca5c4e8
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
71 additions
and
0 deletions
+71
-0
web2_request.py
all_doctor_api/web2_request.py
+12
-0
web2_request.yaml
all_doctor_api/web2_request.yaml
+13
-0
path_setting.py
path_setting.py
+2
-0
test_artemis_cpc_category_service_ids.py
...r_case/web2_case/test_artemis_cpc_category_service_ids.py
+26
-0
artemis_cpc_category_service_ids.yaml
...ctor_data/web2_data/artemis_cpc_category_service_ids.yaml
+18
-0
No files found.
all_doctor_api/web2_request.py
View file @
15261c6c
...
...
@@ -48,13 +48,16 @@ class web2_request(BaseRequest):
def
artemis_ad_add_shopping_cart_info
(
self
):
#我的购物车
return
self
.
api_send
(
self
.
SERVICE_URL
[
"artemis_ad_add_shopping_cart_info"
])
def
artemis_add_value_order_id_detail
(
self
):
"我的服务订单-已购买"
return
self
.
api_send
(
self
.
SERVICE_URL
[
"artemis_add_value_order_id_detail"
])
def
artemis_ad_packageorder_detail
(
self
,
package_order_id
):
"我的服务订单-已支付广告包"
self
.
params
[
"package_order_id"
]
=
package_order_id
return
self
.
api_send
(
self
.
SERVICE_URL
[
"artemis_ad_packageorder_detail"
])
def
artemis_cpc_categorypromotemanage_list
(
self
,
promote_flag
,
id
):
"点点通商品-品类推广管理"
self
.
params
[
"promote_flag"
]
=
promote_flag
...
...
@@ -67,6 +70,14 @@ class web2_request(BaseRequest):
self
.
params
[
"flag_relation"
]
=
flag_relation
return
self
.
api_send
(
self
.
SERVICE_URL
[
"artemis_cpc_category_query"
])
def
artemis_cpc_category_service_ids
(
self
,
page
,
pagesize
,
is_online
,
category_id
):
"品类推广管理-新增推广品类-关联美购"
self
.
params
[
"page"
]
=
page
self
.
params
[
"pagesize"
]
=
pagesize
self
.
params
[
"is_online"
]
=
is_online
self
.
params
[
"category_id"
]
=
category_id
return
self
.
api_send
(
self
.
SERVICE_URL
[
"artemis_cpc_category_service_ids"
])
if
__name__
==
'__main__'
:
print
(
web2_request
()
.
service_list
(
"1"
,
"10"
,
"-1"
,
"-1"
))
...
...
@@ -80,4 +91,5 @@ if __name__ == '__main__':
print
(
web2_request
()
.
artemis_ad_packageorder_detail
(
"685529883901"
))
print
(
web2_request
()
.
artemis_cpc_categorypromotemanage_list
(
-
1
,
-
1
))
print
(
web2_request
()
.
artemis_cpc_category_query
(
"wangyang"
,
0
))
print
(
web2_request
()
.
artemis_cpc_category_service_ids
(
1
,
10
,
-
1
,
8
))
all_doctor_api/web2_request.yaml
View file @
15261c6c
...
...
@@ -109,4 +109,16 @@ artemis_cpc_category_query:
flag_relation
:
${flag_relation}
data
:
{}
json
:
{}
isLogin
:
1
#需要登录
artemis_cpc_category_service_ids
:
method
:
get
url
:
/api/web2/artemis/cpc/category/service_ids
params
:
page
:
${page}
pagesize
:
${pagesize}
is_online
:
${is_online}
category_id
:
${category_id}
data
:
{}
json
:
{}
isLogin
:
1
#需要登录
\ No newline at end of file
path_setting.py
View file @
15261c6c
...
...
@@ -472,6 +472,8 @@ CPCCOMMUNITYCLICKLOGS=os.path.join(BASE_DIR, "backend_auto/test_doctor_data/web_
CPCCATEGORYPROMOTEMANAGELIST
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_doctor_data/web2_data"
,
"artemis_cpc_categorypromotemanage_list.yaml"
)
#医生后台-点点通商品-品类推广管理-新增推广品类
CPCCATEGORYQUERY
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_doctor_data/web2_data"
,
"artemis_cpc_category_query.yaml"
)
#医生后台-点点通商品-品类推广管理-新增推广品类-关联美购
CPCCATEGORYSERVICEIDS
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_doctor_data/web2_data"
,
"artemis_cpc_category_service_ids.yaml"
)
...
...
test_doctor_case/web2_case/test_artemis_cpc_category_service_ids.py
0 → 100644
View file @
15261c6c
import
pytest
from
ids_list
import
get_ids
import
path_setting
from
in_common.base_request
import
BaseRequest
from
all_doctor_api.web2_request
import
web2_request
class
TestArtemisCpcCategoryServiceIds
:
data
=
BaseRequest
()
.
api_load
(
path_setting
.
CPCCATEGORYSERVICEIDS
)
cpccategoryserviceids_case
,
cpccategoryserviceids_data
=
get_ids
(
data
,
"artemis_cpc_category_service_ids"
)
@pytest.mark.parametrize
(
"param"
,
cpccategoryserviceids_data
,
ids
=
cpccategoryserviceids_case
)
def
test_artemis_cpc_category_service_ids
(
self
,
param
):
'''点点通商品-品类推广管理-新增品类推广-关联美购'''
r
=
web2_request
()
.
artemis_cpc_category_service_ids
(
param
[
"page"
],
param
[
"pagesize"
],
param
[
"is_online"
],
param
[
"category_id"
])
print
(
r
)
if
r
[
"error"
]
==
0
:
assert
r
[
"data"
][
"services"
][
0
][
"is_online"
]
==
param
[
"assert"
]
test_doctor_data/web2_data/artemis_cpc_category_service_ids.yaml
0 → 100644
View file @
15261c6c
artemis_cpc_category_service_ids
:
#点点通商品-品类推广管理
-
case
:
"
点点通商品-品类推广-关联美购-美购状态为已下线"
page
:
1
pagesize
:
10
is_online
:
-1
category_id
:
8
assert
:
False
-
case
:
"
点点通商品-品类推广-关联美购-美购状态为已上线"
page
:
1
pagesize
:
10
is_online
:
-1
category_id
:
22
assert
:
True
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