Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
edx-platform-release
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
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
2ec08921
Commit
2ec08921
authored
11 years ago
by
Alexander Kryklia
Browse files
Options
Downloads
Patches
Plain Diff
Revert "Fix tests."
This reverts commit
1ed167d9
.
parent
1ed167d9
No related branches found
Branches containing commit
Tags
release-2020-08-28-11.39
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
lms/djangoapps/courseware/tests/test_video_mongo.py
+3
-5
3 additions, 5 deletions
lms/djangoapps/courseware/tests/test_video_mongo.py
with
3 additions
and
5 deletions
lms/djangoapps/courseware/tests/test_video_mongo.py
+
3
−
5
View file @
2ec08921
# -*- coding: utf-8 -*-
"""
Video xmodule tests in mongo.
"""
import
json
import
unittest
from
collections
import
OrderedDict
from
mock
import
patch
,
PropertyMock
,
MagicMock
from
django.conf
import
settings
...
...
@@ -55,7 +53,7 @@ class TestVideoYouTube(TestVideo):
'
transcript_download_format
'
:
'
srt
'
,
'
transcript_download_formats_list
'
:
[{
'
display_name
'
:
'
SubRip (.srt) file
'
,
'
value
'
:
'
srt
'
},
{
'
display_name
'
:
'
Text (.txt) file
'
,
'
value
'
:
'
txt
'
}],
'
transcript_language
'
:
u
'
en
'
,
'
transcript_languages
'
:
json
.
dumps
(
OrderedDict
(
{
"
en
"
:
"
English
"
,
"
uk
"
:
u
"
Українська
"
}
))
,
'
transcript_languages
'
:
'
{
"
en
"
:
"
English
"
,
"
uk
"
: u
"
Українська
"
}
'
,
'
transcript_translation_url
'
:
self
.
item_descriptor
.
xmodule_runtime
.
handler_url
(
self
.
item_descriptor
,
'
transcript
'
,
'
translation
'
).
rstrip
(
'
/?
'
),
...
...
@@ -99,7 +97,6 @@ class TestVideoNonYouTube(TestVideo):
}
context
=
self
.
item_descriptor
.
render
(
'
student_view
'
).
content
expected_context
=
{
'
ajax_url
'
:
self
.
item_descriptor
.
xmodule_runtime
.
ajax_url
+
'
/save_user_state
'
,
'
data_dir
'
:
getattr
(
self
,
'
data_dir
'
,
None
),
...
...
@@ -242,7 +239,7 @@ class TestGetHtmlMethod(BaseTestXmodule):
expected_context
.
update
({
'
transcript_download_format
'
:
None
if
self
.
item_descriptor
.
track
and
self
.
item_descriptor
.
download_track
else
'
srt
'
,
'
transcript_languages
'
:
'
{
"
en
"
:
"
English
"
}
'
if
not
data
[
'
transcripts
'
]
else
json
.
dumps
({
"
uk
"
:
u
'
Українська
'
})
,
'
transcript_languages
'
:
'
{
"
en
"
:
"
English
"
}
'
if
not
data
[
'
transcripts
'
]
else
'
{
"
uk
"
:
"
Ukrainian
"
}
'
,
'
transcript_language
'
:
u
'
en
'
if
not
data
[
'
transcripts
'
]
or
data
.
get
(
'
sub
'
)
else
u
'
uk
'
,
'
transcript_translation_url
'
:
self
.
item_descriptor
.
xmodule_runtime
.
handler_url
(
self
.
item_descriptor
,
'
transcript
'
,
'
translation
'
...
...
@@ -255,6 +252,7 @@ class TestGetHtmlMethod(BaseTestXmodule):
'
sub
'
:
data
[
'
sub
'
],
'
id
'
:
self
.
item_descriptor
.
location
.
html_id
(),
})
self
.
assertEqual
(
context
,
self
.
item_descriptor
.
xmodule_runtime
.
render_template
(
'
video.html
'
,
expected_context
),
...
...
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