Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
A
AutoApiTest
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
business
AutoApiTest
Commits
4811c05d
Commit
4811c05d
authored
Jan 08, 2021
by
liangfenglong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
更新
parent
1f0585b9
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
50 additions
and
2 deletions
+50
-2
settings.py
conf/settings.py
+4
-2
test_live_mark_service.py
testCase/live/test_live_mark_service.py
+46
-0
No files found.
conf/settings.py
View file @
4811c05d
...
...
@@ -45,4 +45,6 @@ HOSPITAL_NAME = '凯瑞婷'
SEARCH_ORER
=
100
ADD_SERVICE_ONE_ORER
=
201
ADD_SERVICE_MANY_ORER
=
202
DELETE_SERVICE_ORER
=
301
\ No newline at end of file
MARK_SERVICE
=
301
UNDO_MARK_SERVICE
=
302
DELETE_SERVICE_ORER
=
401
\ No newline at end of file
testCase/live/test_live_mark_service.py
0 → 100644
View file @
4811c05d
import
requests
import
pytest
from
utils.gmhttp
import
require_login
from
.livecase
import
LiveCase
from
conf
import
settings
class
LiveMarkService
(
LiveCase
):
'''直播间删除美购'''
def
setUp
(
self
):
uri
=
'/api/janus/live/mark_live_service'
self
.
url
=
self
.
host
+
uri
self
.
data
=
{
'channel_id'
:
self
.
channel_id
,
'stream_id'
:
self
.
stream_id
}
@pytest.mark.post
@pytest.mark.run
(
order
=
settings
.
MARK_SERVICE
)
@require_login
(
settings
.
LIVE_USER
)
def
test_live_mark_service
(
self
):
'''
直播间标记美购
'''
self
.
data
.
update
(
live_service_id
=
LiveCase
.
service_ids
[
0
],
mark_status
=
1
)
rep
=
requests
.
post
(
self
.
url
,
data
=
self
.
data
)
.
json
()
self
.
assertEqual
(
rep
[
'error'
],
0
,
rep
)
self
.
assertEqual
(
rep
[
'data'
][
'toast'
],
"操作成功"
,
rep
)
# 不做具体内容判断,在添加的用例里会有相关部分判断
print
(
'直播间标记美购成功!'
)
@pytest.mark.post
@pytest.mark.run
(
order
=
settings
.
UNDO_MARK_SERVICE
)
@require_login
(
settings
.
LIVE_USER
)
def
test_live_unmark_service
(
self
):
'''
直播间取消标记美购
'''
self
.
data
.
update
(
live_service_id
=
LiveCase
.
service_ids
[
0
],
mark_status
=
0
)
rep
=
requests
.
post
(
self
.
url
,
data
=
self
.
data
)
.
json
()
self
.
assertEqual
(
rep
[
'error'
],
0
,
rep
)
self
.
assertEqual
(
rep
[
'data'
][
'toast'
],
"操作成功"
,
rep
)
# 不做具体内容判断,在添加的用例里会有相关部分判断
print
(
'直播间取消标记美购成功!'
)
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