Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-platform
Overview
Overview
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
edx
edx-platform
Commits
36dfc2c0
Commit
36dfc2c0
authored
Jan 12, 2017
by
muhammad-ammar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
log video id and status along with message
parent
28e3b1cb
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
3 deletions
+16
-3
cms/djangoapps/contentstore/views/tests/test_videos.py
+10
-2
cms/djangoapps/contentstore/views/videos.py
+6
-1
No files found.
cms/djangoapps/contentstore/views/tests/test_videos.py
View file @
36dfc2c0
...
...
@@ -488,13 +488,13 @@ class VideosHandlerTestCase(VideoUploadTestMixin, CourseTestCase):
# Test should fail if video not found
self
.
assertEqual
(
True
,
False
,
'Invalid edx_video_id'
)
def
test_video_status_update_request
(
self
):
@patch
(
'contentstore.views.videos.LOGGER'
)
def
test_video_status_update_request
(
self
,
mock_logger
):
"""
Verifies that video status update request works as expected.
"""
url
=
self
.
get_url_for_course_key
(
self
.
course
.
id
)
edx_video_id
=
'test1'
self
.
assert_video_status
(
url
,
edx_video_id
,
'Uploading'
)
response
=
self
.
client
.
post
(
...
...
@@ -506,6 +506,14 @@ class VideosHandlerTestCase(VideoUploadTestMixin, CourseTestCase):
}]),
content_type
=
"application/json"
)
mock_logger
.
info
.
assert_called_with
(
'VIDEOS: Video status update with id [
%
s], status [
%
s] and message [
%
s]'
,
edx_video_id
,
'upload_failed'
,
'server down'
)
self
.
assertEqual
(
response
.
status_code
,
204
)
self
.
assert_video_status
(
url
,
edx_video_id
,
'Failed'
)
...
...
cms/djangoapps/contentstore/views/videos.py
View file @
36dfc2c0
...
...
@@ -453,7 +453,12 @@ def send_video_status_update(updates):
"""
for
update
in
updates
:
update_video_status
(
update
.
get
(
'edxVideoId'
),
update
.
get
(
'status'
))
LOGGER
.
info
(
update
.
get
(
'message'
))
LOGGER
.
info
(
'VIDEOS: Video status update with id [
%
s], status [
%
s] and message [
%
s]'
,
update
.
get
(
'edxVideoId'
),
update
.
get
(
'status'
),
update
.
get
(
'message'
)
)
return
JsonResponse
()
...
...
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