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
d0ce4e0b
Commit
d0ce4e0b
authored
Jul 30, 2021
by
edz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
om
parent
b23d501d
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
98 additions
and
0 deletions
+98
-0
achelous_request.py
all_om_api/achelous_request.py
+21
-0
achelous_request.yaml
all_om_api/achelous_request.yaml
+20
-0
path_setting.py
path_setting.py
+4
-0
topic_reply_create.yaml
test_backend_data/topic_data/topic_reply_create.yaml
+4
-0
__init__.py
test_om_case/achelous_case/__init__.py
+0
-0
test_batch_add_service.py
test_om_case/achelous_case/test_batch_add_service.py
+24
-0
__init__.py
test_om_data/achelous_data/__init__.py
+0
-0
batch_add_service.yaml
test_om_data/achelous_data/batch_add_service.yaml
+25
-0
No files found.
all_om_api/achelous_request.py
0 → 100644
View file @
d0ce4e0b
import
path_setting
from
in_common.base_request
import
BaseRequest
class
achelous_request
(
BaseRequest
):
def
__init__
(
self
):
self
.
data
=
self
.
api_load
(
path_setting
.
ACHELOUS_REQUEST_CONFIG
)
def
batch_add_service
(
self
,
stream_id
,
service_item_ids
):
self
.
params
[
"stream_id"
]
=
stream_id
self
.
params
[
"service_item_ids"
]
=
service_item_ids
return
self
.
api_send
(
self
.
data
[
"batch_add_service"
])
def
batch_del_service
(
self
,
stream_id
,
service_item_ids
):
self
.
params
[
"stream_id"
]
=
stream_id
self
.
params
[
"service_item_ids"
]
=
service_item_ids
return
self
.
api_send
(
self
.
data
[
"batch_add_service"
])
if
__name__
==
"__main__"
:
print
(
achelous_request
()
.
batch_add_service
(
"4176"
,
"73809,23508,33823"
))
print
(
achelous_request
()
.
batch_del_service
(
"4176"
,
"7312,7311"
))
\ No newline at end of file
all_om_api/achelous_request.yaml
0 → 100644
View file @
d0ce4e0b
batch_add_service
:
method
:
post
url
:
/achelous/live/batch_add_service
params
:
{}
data
:
stream_id
:
${stream_id}
service_item_ids
:
${service_item_ids}
json
:
{}
isLogin
:
1
batch_del_service
:
method
:
post
url
:
/achelous/live/batch_del_service
params
:
{}
data
:
stream_id
:
${stream_id}
service_item_ids
:
${service_item_ids}
json
:
{}
isLogin
:
1
\ No newline at end of file
path_setting.py
View file @
d0ce4e0b
...
...
@@ -544,6 +544,10 @@ CHECK_SKU_IDS = os.path.join(BASE_DIR, "backend_auto/test_om_data/beautycard_dat
CHECK_SPU_IDS_CONFIG
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/all_om_api"
,
"beautycard_request.yaml"
)
CHECK_SPU_IDS
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_om_data/beautycard_data"
,
"check_spu_ids.yaml"
)
#om-achelous
ACHELOUS_REQUEST_CONFIG
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/all_om_api"
,
"achelous_request.yaml"
)
#直播-om后台-批量添加美购
BATCH_ADD_SERVICE
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_om_data/achelous_data"
,
"batch_add_service.yaml"
)
#次卡商详页
BEAUTY_CARD_DETAIL
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_backend_data/janus_data"
,
"beauty_card_detail.yaml"
)
...
...
test_backend_data/topic_data/topic_reply_create.yaml
View file @
d0ce4e0b
...
...
@@ -3,7 +3,11 @@ reply_create:
beuzhu
:
'
#
备注:
这个文件有冲突的话,那个版本都行不会影响,回退/接受当前版本都行,因为每次运行content都会改变'
case
:
日记贴一级评论创建--正常校验&创建二级评论--正常校验
channel
:
benzhan
<<<<<<< Updated upstream
content
:
ces测试+2021-07-28 19:16:19
=======
content
:
ces测试+2021-07-26 18:10:54
>
>>>>>>
Stashed
changes
message: 请勿回复重复内容
message1: 回复成功
message2: 你的回复有点频繁,稍后再来
...
...
test_om_case/achelous_case/__init__.py
0 → 100644
View file @
d0ce4e0b
test_om_case/achelous_case/test_batch_add_service.py
0 → 100644
View file @
d0ce4e0b
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
TestBatchAddService
:
data
=
BaseRequest
()
.
api_load
(
path_setting
.
BATCH_ADD_SERVICE
)
batch_add_service_case
,
batch_add_service_data
=
get_ids
(
data
,
"batch_add_service"
)
@pytest.mark.parametrize
(
"param"
,
batch_add_service_data
,
ids
=
batch_add_service_case
)
def
test_batch_add_service
(
self
,
param
):
r
=
achelous_request
()
.
batch_add_service
(
param
[
'stream_id'
],
param
[
'service_item_ids'
])
#print(type(r["failed_service_item_ids"]))
if
r
.
get
(
"code"
)
==
1
:
assert
r
[
'message'
]
==
param
[
"assert"
]
elif
len
(
r
[
"failed_service_item_ids"
])
==
0
:
assert
r
[
"success_service_item_ids"
]
==
param
[
"assert2"
]
elif
r
[
"success_service_item_ids"
]
==
0
:
assert
r
[
"success_service_item_ids"
]
==
param
[
"assert1"
]
live_request
()
.
delete_live_service
(
"745"
,
"7242"
,
"7.45.0"
)
\ No newline at end of file
test_om_data/achelous_data/__init__.py
0 → 100644
View file @
d0ce4e0b
test_om_data/achelous_data/batch_add_service.yaml
0 → 100644
View file @
d0ce4e0b
batch_add_service
:
-
case
:
"
om-直播-批量添加一件美购"
stream_id
:
"
4166"
service_item_ids
:
"
73809"
assert2
:
[
73809
]
-
case
:
"
om-直播-批量添加多件美购"
stream_id
:
"
4166"
service_item_ids
:
"
23508,33823"
assert2
:
[
33823
,
23508
]
-
case
:
"
om-直播添加商品-输入不合法符号"
stream_id
:
"
4166"
service_item_ids
:
"
73809,23508,33823"
assert
:
"
请输入合法的SKU
ID以,隔开"
-
case
:
"
om-直播-添加错误美购id"
stream_id
:
"
4166"
service_item_ids
:
"
235"
assert1
:
'
[235]'
\ 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