Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
edx-platform-release
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
1
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Hsin-Yu Chien
edx-platform-release
Commits
be28e5c4
Commit
be28e5c4
authored
8 years ago
by
Muhammad Ammar
Committed by
GitHub
8 years ago
Browse files
Options
Downloads
Plain Diff
Merge pull request #14314 from edx/ammar/log-videoid-and-status
log video id and status along with message
parents
577dea6a
36dfc2c0
Loading
Loading
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
cms/djangoapps/contentstore/views/tests/test_videos.py
+10
-2
10 additions, 2 deletions
cms/djangoapps/contentstore/views/tests/test_videos.py
cms/djangoapps/contentstore/views/videos.py
+6
-1
6 additions, 1 deletion
cms/djangoapps/contentstore/views/videos.py
with
16 additions
and
3 deletions
cms/djangoapps/contentstore/views/tests/test_videos.py
+
10
−
2
View file @
be28e5c4
...
...
@@ -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
'
)
...
...
This diff is collapsed.
Click to expand it.
cms/djangoapps/contentstore/views/videos.py
+
6
−
1
View file @
be28e5c4
...
...
@@ -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
()
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment