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
2ca08300
Commit
2ca08300
authored
Aug 20, 2021
by
张伟男
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
工业分类
parent
64702c5c
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
193 additions
and
2 deletions
+193
-2
achelous_request.py
all_om_api/achelous_request.py
+38
-2
achelous_request.yaml
all_om_api/achelous_request.yaml
+47
-0
path_setting.py
path_setting.py
+10
-0
test_catalog_add.py
test_om_case/achelous_case/test_catalog_add.py
+21
-0
test_category_ordering.py
test_om_case/achelous_case/test_category_ordering.py
+19
-0
test_industry_search.py
test_om_case/achelous_case/test_industry_search.py
+19
-0
catalog_add.yaml
test_om_data/achelous_data/catalog_add.yaml
+12
-0
category_ordering.yaml
test_om_data/achelous_data/category_ordering.yaml
+15
-0
industry_search.yaml
test_om_data/achelous_data/industry_search.yaml
+12
-0
No files found.
all_om_api/achelous_request.py
View file @
2ca08300
...
...
@@ -65,8 +65,44 @@ class achelous_request(BaseRequest):
self
.
params
[
"unit"
]
=
unit
return
self
.
api_send
(
self
.
data
[
"unit_update"
])
# OM后台-商业分类管理,后台分类(工业)
def
industry_search
(
self
,
tag_system_type
,
tag_name
,
is_online
,
is_display
,
is_move
,
page
,
size
):
self
.
params
[
"tag_system_type"
]
=
tag_system_type
self
.
params
[
"tag_name"
]
=
tag_name
self
.
params
[
"is_online"
]
=
is_online
self
.
params
[
"is_display"
]
=
is_display
self
.
params
[
"is_move"
]
=
is_move
self
.
params
[
"page"
]
=
page
self
.
params
[
"size"
]
=
size
return
self
.
api_send
(
self
.
data
[
"industry_search"
])
# OM后台-商业分类管理,后台分类(工业),标签排序
def
category_ordering
(
self
,
tag_id
,
tag_type
,
tag_system_type
,
operation_type
):
self
.
params
[
"tag_id"
]
=
tag_id
self
.
params
[
"tag_type"
]
=
tag_type
self
.
params
[
"tag_system_type"
]
=
tag_system_type
self
.
params
[
"operation_type"
]
=
operation_type
return
self
.
api_send
(
self
.
data
[
"category_ordering"
])
def
catalog_add
(
self
,
tag_system_type
,
tag_name
,
father_tag_id
,
child_tag_ids
,
is_online
,
is_display
,
is_move
):
self
.
params
[
"tag_system_type"
]
=
tag_system_type
self
.
params
[
"tag_name"
]
=
tag_name
self
.
params
[
"father_tag_id"
]
=
father_tag_id
self
.
params
[
"child_tag_ids"
]
=
child_tag_ids
self
.
params
[
"is_online"
]
=
is_online
self
.
params
[
"is_display"
]
=
is_display
self
.
params
[
"is_move"
]
=
is_move
return
self
.
api_send
(
self
.
data
[
"catalog_add"
])
if
__name__
==
"__main__"
:
# print(achelous_request().batch_add_service("4176", "73809,23508,33823"))
# print(achelous_request().batch_del_service("4176","7312,7311"))
# print(achelous_request().special_edit("32244157","自定义专题创建1","0","2021-08-01 00:00:00","2021-09-30 00:00:00","1","自定义专题创建1","自定义专题创建1","https://heras.igengmei.com/4d5eef0a-78dd-43b3-98b7-137d2341f106-1628565831259"))
print
(
achelous_request
()
.
special_list
(
'1'
,
'10'
,
''
,
''
,
''
,
''
,
''
,
'1'
,
'0'
,
''
,
''
))
\ No newline at end of file
# print(achelous_request().special_list('1', '10', '', '', '', '', '', '1', '0', '', ''))
# print(achelous_request().industry_search(1,"口腔","all","all","all",1,10))
# print(achelous_request().category_ordering(1002463,1,1,2))
print
(
achelous_request
()
.
catalog_add
(
1
,
"自动化接口测试添加2"
,
15510
,
[],
"false"
,
"false"
,
"false"
))
\ No newline at end of file
all_om_api/achelous_request.yaml
View file @
2ca08300
...
...
@@ -89,4 +89,50 @@ unit_update:
order
:
${order}
unit
:
${unit}
json
:
{}
isLogin
:
1
#OM后台-商业分类管理,后台分类(工业)
industry_search
:
method
:
GET
url
:
/achelous/api/industry/search
params
:
tag_system_type
:
${tag_system_type}
tag_name
:
${tag_name}
is_online
:
${is_online}
is_display
:
${is_display}
is_move
:
${is_move}
page
:
${page}
size
:
${size}
data
:
{}
json
:
{}
isLogin
:
1
#OM后台-商业分类管理,后台分类(工业),标签排序
category_ordering
:
method
:
POST
url
:
/achelous/api/category/ordering
params
:
{}
data
:
tag_id
:
${tag_id}
tag_type
:
${tag_type}
tag_system_type
:
${tag_system_type}
operation_type
:
${operation_type}
json
:
{}
isLogin
:
1
#OM后台-商业分类管理,后台分类(工业),添加分类
catalog_add
:
method
:
POST
url
:
/achelous/api/catalog/add
params
:
{}
data
:
tag_system_type
:
${tag_system_type}
tag_name
:
${tag_name}
father_tag_id
:
${father_tag_id}
child_tag_ids
:
${child_tag_ids}
is_online
:
${is_online}
is_display
:
${is_display}
is_move
:
${is_move}
json
:
{}
isLogin
:
1
\ No newline at end of file
path_setting.py
View file @
2ca08300
...
...
@@ -275,6 +275,16 @@ ORDERS_MY_V2_DATA = os.path.join(BASE_DIR, "backend_auto/test_backend_data/order
#我的订单-各状态订单数量
ORDER_MY_STATUS
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_backend_data/orders_data"
,
"my_status.yaml"
)
# OM后台-商业分类管理,后台分类(工业)
ACHELOUS_INDUSTRY_SEARCH_DATA
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_om_data/achelous_data"
,
"industry_search.yaml"
)
# OM后台-商业分类管理,后台分类(工业)排序
ACHELOUS_CATEGORY_ORDERING_DATA
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_om_data/achelous_data"
,
"category_ordering.yaml"
)
# OM后台-商业分类管理,后台分类(工业)排序,添加分类
ACHELOUS_CATEGORY_ADD_DATA
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_om_data/achelous_data"
,
"catalog_add.yaml"
)
LOGIN_PASSWD
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_backend_data/accounts_data"
,
"login_passwd.yaml"
)
LOGIN_CONFIG
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/all_backend_api"
,
"accounts_request.yaml"
)
...
...
test_om_case/achelous_case/test_catalog_add.py
0 → 100644
View file @
2ca08300
import
pytest
import
path_setting
from
all_om_api.achelous_request
import
achelous_request
from
ids_list
import
get_ids
from
in_common.base_request
import
BaseRequest
class
TestCategortAdd
:
data
=
BaseRequest
()
.
api_load
(
path_setting
.
ACHELOUS_CATEGORY_ADD_DATA
)
catalog_add_case
,
catalog_add_data
=
get_ids
(
data
,
'catalog_add'
)
@pytest.mark.parametrize
(
"param"
,
catalog_add_data
,
ids
=
catalog_add_case
)
def
test_category_add
(
self
,
param
):
import
datetime
dt
=
datetime
.
datetime
.
now
()
.
strftime
(
'
%
Y-
%
m-
%
d
%
H:
%
M:
%
S'
)
r
=
achelous_request
()
.
catalog_add
(
param
[
"tag_system_type"
],
param
[
"tag_name"
]
+
dt
,
param
[
"father_tag_id"
],
param
[
"child_tag_ids"
],
param
[
"is_online"
],
param
[
"is_display"
],
param
[
"is_move"
])
print
(
r
)
test_om_case/achelous_case/test_category_ordering.py
0 → 100644
View file @
2ca08300
import
pytest
import
path_setting
from
all_om_api.achelous_request
import
achelous_request
from
ids_list
import
get_ids
from
in_common.base_request
import
BaseRequest
class
TestCategortOrdering
:
data
=
BaseRequest
()
.
api_load
(
path_setting
.
ACHELOUS_CATEGORY_ORDERING_DATA
)
category_ordering_case
,
category_ordering_data
=
get_ids
(
data
,
'category_ordering'
)
@pytest.mark.parametrize
(
"param"
,
category_ordering_data
,
ids
=
category_ordering_case
)
def
test_category_ordering
(
self
,
param
):
r
=
achelous_request
()
.
category_ordering
(
param
[
"tag_id"
],
param
[
"tag_type"
],
param
[
"tag_system_type"
],
param
[
"operation_type"
])
print
(
r
)
if
r
[
"code"
]
==
0
and
r
[
"msg"
]
==
"success"
:
assert
len
(
r
[
"data"
])
>
0
test_om_case/achelous_case/test_industry_search.py
0 → 100644
View file @
2ca08300
import
pytest
import
path_setting
from
all_om_api.achelous_request
import
achelous_request
from
ids_list
import
get_ids
from
in_common.base_request
import
BaseRequest
class
TestIndustrySearch
:
data
=
BaseRequest
()
.
api_load
(
path_setting
.
ACHELOUS_INDUSTRY_SEARCH_DATA
)
industry_search_case
,
industry_search_data
=
get_ids
(
data
,
'industry_search'
)
@pytest.mark.parametrize
(
"param"
,
industry_search_data
,
ids
=
industry_search_case
)
def
test_industry_search
(
self
,
param
):
r
=
achelous_request
()
.
industry_search
(
param
[
"tag_system_type"
],
param
[
"tag_name"
],
param
[
"is_online"
],
param
[
"is_display"
],
param
[
"is_move"
],
param
[
"page"
],
param
[
"size"
])
# print(r)
if
r
[
"code"
]
==
0
and
r
[
"msg"
]
==
"success"
:
assert
len
(
r
[
"data"
][
"data"
])
>
0
test_om_data/achelous_data/catalog_add.yaml
0 → 100644
View file @
2ca08300
#OM后台-商业分类管理,后台分类(工业),添加分类
catalog_add
:
-
case
:
'
工业分类,增加分类'
tag_system_type
:
1
tag_name
:
"
自动化接口测试添加"
father_tag_id
:
15510
child_tag_ids
:
[]
is_online
:
"
false"
is_display
:
"
false"
is_move
:
"
false"
\ No newline at end of file
test_om_data/achelous_data/category_ordering.yaml
0 → 100644
View file @
2ca08300
#OM后台-商业分类管理,后台分类(工业),标签排序
category_ordering
:
-
case
:
'
后台分类(工业)
上升'
tag_id
:
1002463
tag_type
:
1
tag_system_type
:
1
operation_type
:
1
-
case
:
'
后台分类(工业)
下降'
tag_id
:
1002463
tag_type
:
1
tag_system_type
:
1
operation_type
:
2
\ No newline at end of file
test_om_data/achelous_data/industry_search.yaml
0 → 100644
View file @
2ca08300
#OM后台-商业分类管理,后台分类(工业)
industry_search
:
-
case
:
'
搜索口腔标签'
tag_system_type
:
1
tag_name
:
"
白"
is_online
:
"
all"
is_display
:
"
all"
is_move
:
"
all"
page
:
1
size
:
10
\ 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