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
b33b5c7b
Commit
b33b5c7b
authored
Aug 08, 2013
by
Vasyl Nakvasiuk
Committed by
Anton Stupak
Aug 12, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Python: videoalpha -> video.
parent
dad9f26a
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
47 additions
and
49 deletions
+47
-49
cms/djangoapps/contentstore/tests/test_contentstore.py
+7
-6
cms/djangoapps/contentstore/views/component.py
+0
-1
common/lib/xmodule/setup.py
+1
-1
common/lib/xmodule/xmodule/tests/test_editing_module.py
+1
-1
common/lib/xmodule/xmodule/tests/test_video.py
+0
-0
common/lib/xmodule/xmodule/tests/test_xblock_wrappers.py
+2
-4
common/lib/xmodule/xmodule/video_module.py
+0
-0
common/lib/xmodule/xmodule/videoalpha_module.py
+0
-0
lms/djangoapps/courseware/tests/test_video_mongo.py
+8
-8
lms/djangoapps/courseware/tests/test_video_xml.py
+28
-28
No files found.
cms/djangoapps/contentstore/tests/test_contentstore.py
View file @
b33b5c7b
...
@@ -107,8 +107,8 @@ class ContentStoreToyCourseTest(ModuleStoreTestCase):
...
@@ -107,8 +107,8 @@ class ContentStoreToyCourseTest(ModuleStoreTestCase):
expected_types is the list of elements that should appear on the page.
expected_types is the list of elements that should appear on the page.
expected_types and component_types should be similar, but not
expected_types and component_types should be similar, but not
exactly the same -- for example, 'video
alpha
' in
exactly the same -- for example, 'video' in
component_types should cause 'Video
Alpha
' to be present.
component_types should cause 'Video' to be present.
"""
"""
store
=
modulestore
(
'direct'
)
store
=
modulestore
(
'direct'
)
import_from_xml
(
store
,
'common/test/data/'
,
[
'simple'
])
import_from_xml
(
store
,
'common/test/data/'
,
[
'simple'
])
...
@@ -143,7 +143,7 @@ class ContentStoreToyCourseTest(ModuleStoreTestCase):
...
@@ -143,7 +143,7 @@ class ContentStoreToyCourseTest(ModuleStoreTestCase):
'Peer Grading Interface'
])
'Peer Grading Interface'
])
def
test_advanced_components_require_two_clicks
(
self
):
def
test_advanced_components_require_two_clicks
(
self
):
self
.
check_components_on_page
([
'video
alpha'
],
[
'Video Alpha
'
])
self
.
check_components_on_page
([
'video
'
],
[
'Video
'
])
def
test_malformed_edit_unit_request
(
self
):
def
test_malformed_edit_unit_request
(
self
):
store
=
modulestore
(
'direct'
)
store
=
modulestore
(
'direct'
)
...
@@ -1624,7 +1624,7 @@ class MetadataSaveTestCase(ModuleStoreTestCase):
...
@@ -1624,7 +1624,7 @@ class MetadataSaveTestCase(ModuleStoreTestCase):
constructor are correctly persisted.
constructor are correctly persisted.
"""
"""
# We should start with a source field, from the XML's <source/> tag
# We should start with a source field, from the XML's <source/> tag
self
.
assertIn
(
'
source
'
,
own_metadata
(
self
.
descriptor
))
self
.
assertIn
(
'
html5_sources
'
,
own_metadata
(
self
.
descriptor
))
attrs_to_strip
=
{
attrs_to_strip
=
{
'show_captions'
,
'show_captions'
,
'youtube_id_1_0'
,
'youtube_id_1_0'
,
...
@@ -1634,6 +1634,7 @@ class MetadataSaveTestCase(ModuleStoreTestCase):
...
@@ -1634,6 +1634,7 @@ class MetadataSaveTestCase(ModuleStoreTestCase):
'start_time'
,
'start_time'
,
'end_time'
,
'end_time'
,
'source'
,
'source'
,
'html5_sources'
,
'track'
'track'
}
}
# We strip out all metadata fields to reproduce a bug where
# We strip out all metadata fields to reproduce a bug where
...
@@ -1646,11 +1647,11 @@ class MetadataSaveTestCase(ModuleStoreTestCase):
...
@@ -1646,11 +1647,11 @@ class MetadataSaveTestCase(ModuleStoreTestCase):
field
.
delete_from
(
self
.
descriptor
)
field
.
delete_from
(
self
.
descriptor
)
# Assert that we correctly stripped the field
# Assert that we correctly stripped the field
self
.
assertNotIn
(
'
source
'
,
own_metadata
(
self
.
descriptor
))
self
.
assertNotIn
(
'
html5_sources
'
,
own_metadata
(
self
.
descriptor
))
get_modulestore
(
self
.
descriptor
.
location
)
.
update_metadata
(
get_modulestore
(
self
.
descriptor
.
location
)
.
update_metadata
(
self
.
descriptor
.
location
,
self
.
descriptor
.
location
,
own_metadata
(
self
.
descriptor
)
own_metadata
(
self
.
descriptor
)
)
)
module
=
get_modulestore
(
self
.
descriptor
.
location
)
.
get_item
(
self
.
descriptor
.
location
)
module
=
get_modulestore
(
self
.
descriptor
.
location
)
.
get_item
(
self
.
descriptor
.
location
)
# Assert that get_item correctly sets the metadata
# Assert that get_item correctly sets the metadata
self
.
assertIn
(
'
source
'
,
own_metadata
(
module
))
self
.
assertIn
(
'
html5_sources
'
,
own_metadata
(
module
))
cms/djangoapps/contentstore/views/component.py
View file @
b33b5c7b
...
@@ -49,7 +49,6 @@ NOTE_COMPONENT_TYPES = ['notes']
...
@@ -49,7 +49,6 @@ NOTE_COMPONENT_TYPES = ['notes']
ADVANCED_COMPONENT_TYPES
=
[
ADVANCED_COMPONENT_TYPES
=
[
'annotatable'
,
'annotatable'
,
'word_cloud'
,
'word_cloud'
,
'videoalpha'
,
'graphical_slider_tool'
'graphical_slider_tool'
]
+
OPEN_ENDED_COMPONENT_TYPES
+
NOTE_COMPONENT_TYPES
]
+
OPEN_ENDED_COMPONENT_TYPES
+
NOTE_COMPONENT_TYPES
ADVANCED_COMPONENT_CATEGORY
=
'advanced'
ADVANCED_COMPONENT_CATEGORY
=
'advanced'
...
...
common/lib/xmodule/setup.py
View file @
b33b5c7b
...
@@ -40,7 +40,7 @@ setup(
...
@@ -40,7 +40,7 @@ setup(
"timelimit = xmodule.timelimit_module:TimeLimitDescriptor"
,
"timelimit = xmodule.timelimit_module:TimeLimitDescriptor"
,
"vertical = xmodule.vertical_module:VerticalDescriptor"
,
"vertical = xmodule.vertical_module:VerticalDescriptor"
,
"video = xmodule.video_module:VideoDescriptor"
,
"video = xmodule.video_module:VideoDescriptor"
,
"videoalpha = xmodule.video
alpha_module:VideoAlpha
Descriptor"
,
"videoalpha = xmodule.video
_module:Video
Descriptor"
,
"videodev = xmodule.backcompat_module:TranslateCustomTagDescriptor"
,
"videodev = xmodule.backcompat_module:TranslateCustomTagDescriptor"
,
"videosequence = xmodule.seq_module:SequenceDescriptor"
,
"videosequence = xmodule.seq_module:SequenceDescriptor"
,
"discussion = xmodule.discussion_module:DiscussionDescriptor"
,
"discussion = xmodule.discussion_module:DiscussionDescriptor"
,
...
...
common/lib/xmodule/xmodule/tests/test_editing_module.py
View file @
b33b5c7b
...
@@ -33,7 +33,7 @@ class TabsEditingDescriptorTestCase(unittest.TestCase):
...
@@ -33,7 +33,7 @@ class TabsEditingDescriptorTestCase(unittest.TestCase):
},
},
{
{
'name'
:
"Subtitles"
,
'name'
:
"Subtitles"
,
'template'
:
"video
alpha
/subtitles.html"
,
'template'
:
"video/subtitles.html"
,
},
},
{
{
'name'
:
"Settings"
,
'name'
:
"Settings"
,
...
...
common/lib/xmodule/xmodule/tests/test_video
alpha
.py
→
common/lib/xmodule/xmodule/tests/test_video.py
View file @
b33b5c7b
This diff is collapsed.
Click to expand it.
common/lib/xmodule/xmodule/tests/test_xblock_wrappers.py
View file @
b33b5c7b
...
@@ -16,10 +16,9 @@ from xmodule.gst_module import GraphicalSliderToolDescriptor
...
@@ -16,10 +16,9 @@ from xmodule.gst_module import GraphicalSliderToolDescriptor
from
xmodule.html_module
import
HtmlDescriptor
from
xmodule.html_module
import
HtmlDescriptor
from
xmodule.peer_grading_module
import
PeerGradingDescriptor
from
xmodule.peer_grading_module
import
PeerGradingDescriptor
from
xmodule.poll_module
import
PollDescriptor
from
xmodule.poll_module
import
PollDescriptor
from
xmodule.video_module
import
VideoDescriptor
from
xmodule.word_cloud_module
import
WordCloudDescriptor
from
xmodule.word_cloud_module
import
WordCloudDescriptor
from
xmodule.crowdsource_hinter
import
CrowdsourceHinterDescriptor
from
xmodule.crowdsource_hinter
import
CrowdsourceHinterDescriptor
from
xmodule.video
alpha_module
import
VideoAlpha
Descriptor
from
xmodule.video
_module
import
Video
Descriptor
from
xmodule.seq_module
import
SequenceDescriptor
from
xmodule.seq_module
import
SequenceDescriptor
from
xmodule.conditional_module
import
ConditionalDescriptor
from
xmodule.conditional_module
import
ConditionalDescriptor
from
xmodule.randomize_module
import
RandomizeDescriptor
from
xmodule.randomize_module
import
RandomizeDescriptor
...
@@ -35,9 +34,8 @@ LEAF_XMODULES = (
...
@@ -35,9 +34,8 @@ LEAF_XMODULES = (
HtmlDescriptor
,
HtmlDescriptor
,
PeerGradingDescriptor
,
PeerGradingDescriptor
,
PollDescriptor
,
PollDescriptor
,
VideoDescriptor
,
# This is being excluded because it has dependencies on django
# This is being excluded because it has dependencies on django
#Video
Alpha
Descriptor,
#VideoDescriptor,
WordCloudDescriptor
,
WordCloudDescriptor
,
)
)
...
...
common/lib/xmodule/xmodule/video_module.py
View file @
b33b5c7b
This diff is collapsed.
Click to expand it.
common/lib/xmodule/xmodule/videoalpha_module.py
deleted
100644 → 0
View file @
dad9f26a
This diff is collapsed.
Click to expand it.
lms/djangoapps/courseware/tests/test_video
alpha
_mongo.py
→
lms/djangoapps/courseware/tests/test_video_mongo.py
View file @
b33b5c7b
...
@@ -2,22 +2,22 @@
...
@@ -2,22 +2,22 @@
"""Video xmodule tests in mongo."""
"""Video xmodule tests in mongo."""
from
.
import
BaseTestXmodule
from
.
import
BaseTestXmodule
from
.test_video
alpha
_xml
import
SOURCE_XML
from
.test_video_xml
import
SOURCE_XML
from
django.conf
import
settings
from
django.conf
import
settings
from
xmodule.video
alpha
_module
import
_create_youtube_string
from
xmodule.video_module
import
_create_youtube_string
class
TestVideo
(
BaseTestXmodule
):
class
TestVideo
(
BaseTestXmodule
):
"""Integration tests: web client + mongo."""
"""Integration tests: web client + mongo."""
CATEGORY
=
"video
alpha
"
CATEGORY
=
"video"
DATA
=
SOURCE_XML
DATA
=
SOURCE_XML
MODEL_DATA
=
{
MODEL_DATA
=
{
'data'
:
DATA
'data'
:
DATA
}
}
def
setUp
(
self
):
def
setUp
(
self
):
# Since the Video
Alpha
Descriptor changes `self._model_data`,
# Since the VideoDescriptor changes `self._model_data`,
# we need to instantiate `self.item_module` through
# we need to instantiate `self.item_module` through
# `self.item_descriptor` rather than directly constructing it
# `self.item_descriptor` rather than directly constructing it
super
(
TestVideo
,
self
)
.
setUp
()
super
(
TestVideo
,
self
)
.
setUp
()
...
@@ -40,7 +40,7 @@ class TestVideo(BaseTestXmodule):
...
@@ -40,7 +40,7 @@ class TestVideo(BaseTestXmodule):
])
.
pop
(),
])
.
pop
(),
404
)
404
)
def
test_video
alpha
_constructor
(
self
):
def
test_video_constructor
(
self
):
"""Make sure that all parameters extracted correclty from xml"""
"""Make sure that all parameters extracted correclty from xml"""
context
=
self
.
item_module
.
get_html
()
context
=
self
.
item_module
.
get_html
()
...
@@ -74,7 +74,7 @@ class TestVideoNonYouTube(TestVideo):
...
@@ -74,7 +74,7 @@ class TestVideoNonYouTube(TestVideo):
"""Integration tests: web client + mongo."""
"""Integration tests: web client + mongo."""
DATA
=
"""
DATA
=
"""
<video
alpha
show_captions="true"
<video show_captions="true"
display_name="A Name"
display_name="A Name"
sub="a_sub_file.srt.sjson"
sub="a_sub_file.srt.sjson"
start_time="01:00:03" end_time="01:00:10"
start_time="01:00:03" end_time="01:00:10"
...
@@ -82,13 +82,13 @@ class TestVideoNonYouTube(TestVideo):
...
@@ -82,13 +82,13 @@ class TestVideoNonYouTube(TestVideo):
<source src="example.mp4"/>
<source src="example.mp4"/>
<source src="example.webm"/>
<source src="example.webm"/>
<source src="example.ogv"/>
<source src="example.ogv"/>
</video
alpha
>
</video>
"""
"""
MODEL_DATA
=
{
MODEL_DATA
=
{
'data'
:
DATA
'data'
:
DATA
}
}
def
test_video
alpha
_constructor
(
self
):
def
test_video_constructor
(
self
):
"""Make sure that if the 'youtube' attribute is omitted in XML, then
"""Make sure that if the 'youtube' attribute is omitted in XML, then
the template generates an empty string for the YouTube streams.
the template generates an empty string for the YouTube streams.
"""
"""
...
...
lms/djangoapps/courseware/tests/test_video
alpha
_xml.py
→
lms/djangoapps/courseware/tests/test_video_xml.py
View file @
b33b5c7b
# -*- coding: utf-8 -*-
# -*- coding: utf-8 -*-
# pylint: disable=W0212
# pylint: disable=W0212
"""Test for Video
Alpha
Xmodule functional logic.
"""Test for Video Xmodule functional logic.
These test data read from xml, not from mongo.
These test data read from xml, not from mongo.
We have a ModuleStoreTestCase class defined in
We have a ModuleStoreTestCase class defined in
...
@@ -20,14 +20,14 @@ import unittest
...
@@ -20,14 +20,14 @@ import unittest
from
django.conf
import
settings
from
django.conf
import
settings
from
xmodule.video
alpha
_module
import
(
from
xmodule.video_module
import
(
Video
Alpha
Descriptor
,
_create_youtube_string
)
VideoDescriptor
,
_create_youtube_string
)
from
xmodule.modulestore
import
Location
from
xmodule.modulestore
import
Location
from
xmodule.tests
import
get_test_system
,
LogicTest
from
xmodule.tests
import
get_test_system
,
LogicTest
SOURCE_XML
=
"""
SOURCE_XML
=
"""
<video
alpha
show_captions="true"
<video show_captions="true"
display_name="A Name"
display_name="A Name"
youtube="0.75:jNCf2gIqpeE,1.0:ZwkTiUPN0mg,1.25:rsq9auxASqI,1.50:kMyNdzVHHgg"
youtube="0.75:jNCf2gIqpeE,1.0:ZwkTiUPN0mg,1.25:rsq9auxASqI,1.50:kMyNdzVHHgg"
sub="a_sub_file.srt.sjson"
sub="a_sub_file.srt.sjson"
...
@@ -36,12 +36,12 @@ SOURCE_XML = """
...
@@ -36,12 +36,12 @@ SOURCE_XML = """
<source src="example.mp4"/>
<source src="example.mp4"/>
<source src="example.webm"/>
<source src="example.webm"/>
<source src="example.ogv"/>
<source src="example.ogv"/>
</video
alpha
>
</video>
"""
"""
class
Video
Alpha
Factory
(
object
):
class
VideoFactory
(
object
):
"""A helper class to create video
alpha
modules with various parameters
"""A helper class to create video modules with various parameters
for testing.
for testing.
"""
"""
...
@@ -50,28 +50,28 @@ class VideoAlphaFactory(object):
...
@@ -50,28 +50,28 @@ class VideoAlphaFactory(object):
@staticmethod
@staticmethod
def
create
():
def
create
():
"""Method return Video
Alpha
Xmodule instance."""
"""Method return Video Xmodule instance."""
location
=
Location
([
"i4x"
,
"edX"
,
"video
alpha
"
,
"default"
,
location
=
Location
([
"i4x"
,
"edX"
,
"video"
,
"default"
,
"SampleProblem1"
])
"SampleProblem1"
])
model_data
=
{
'data'
:
Video
Alpha
Factory
.
sample_problem_xml_youtube
,
model_data
=
{
'data'
:
VideoFactory
.
sample_problem_xml_youtube
,
'location'
:
location
}
'location'
:
location
}
system
=
get_test_system
()
system
=
get_test_system
()
system
.
render_template
=
lambda
template
,
context
:
context
system
.
render_template
=
lambda
template
,
context
:
context
descriptor
=
Video
Alpha
Descriptor
(
system
,
model_data
)
descriptor
=
VideoDescriptor
(
system
,
model_data
)
module
=
descriptor
.
xmodule
(
system
)
module
=
descriptor
.
xmodule
(
system
)
return
module
return
module
class
Video
Alpha
ModuleUnitTest
(
unittest
.
TestCase
):
class
VideoModuleUnitTest
(
unittest
.
TestCase
):
"""Unit tests for Video
Alpha
Xmodule."""
"""Unit tests for Video Xmodule."""
def
test_video
alpha
_get_html
(
self
):
def
test_video_get_html
(
self
):
"""Make sure that all parameters extracted correclty from xml"""
"""Make sure that all parameters extracted correclty from xml"""
module
=
Video
Alpha
Factory
.
create
()
module
=
VideoFactory
.
create
()
module
.
runtime
.
render_template
=
lambda
template
,
context
:
context
module
.
runtime
.
render_template
=
lambda
template
,
context
:
context
sources
=
{
sources
=
{
...
@@ -98,18 +98,18 @@ class VideoAlphaModuleUnitTest(unittest.TestCase):
...
@@ -98,18 +98,18 @@ class VideoAlphaModuleUnitTest(unittest.TestCase):
self
.
assertEqual
(
module
.
get_html
(),
expected_context
)
self
.
assertEqual
(
module
.
get_html
(),
expected_context
)
def
test_video
alpha
_instance_state
(
self
):
def
test_video_instance_state
(
self
):
module
=
Video
Alpha
Factory
.
create
()
module
=
VideoFactory
.
create
()
self
.
assertDictEqual
(
self
.
assertDictEqual
(
json
.
loads
(
module
.
get_instance_state
()),
json
.
loads
(
module
.
get_instance_state
()),
{
'position'
:
0
})
{
'position'
:
0
})
class
Video
Alpha
ModuleLogicTest
(
LogicTest
):
class
VideoModuleLogicTest
(
LogicTest
):
"""Tests for logic of Video
Alpha
Xmodule."""
"""Tests for logic of Video Xmodule."""
descriptor_class
=
Video
Alpha
Descriptor
descriptor_class
=
VideoDescriptor
raw_model_data
=
{
raw_model_data
=
{
'data'
:
'<video />'
'data'
:
'<video />'
...
@@ -117,23 +117,23 @@ class VideoAlphaModuleLogicTest(LogicTest):
...
@@ -117,23 +117,23 @@ class VideoAlphaModuleLogicTest(LogicTest):
def
test_parse_time
(
self
):
def
test_parse_time
(
self
):
"""Ensure that times are parsed correctly into seconds."""
"""Ensure that times are parsed correctly into seconds."""
output
=
Video
Alpha
Descriptor
.
_parse_time
(
'00:04:07'
)
output
=
VideoDescriptor
.
_parse_time
(
'00:04:07'
)
self
.
assertEqual
(
output
,
247
)
self
.
assertEqual
(
output
,
247
)
def
test_parse_time_none
(
self
):
def
test_parse_time_none
(
self
):
"""Check parsing of None."""
"""Check parsing of None."""
output
=
Video
Alpha
Descriptor
.
_parse_time
(
None
)
output
=
VideoDescriptor
.
_parse_time
(
None
)
self
.
assertEqual
(
output
,
''
)
self
.
assertEqual
(
output
,
''
)
def
test_parse_time_empty
(
self
):
def
test_parse_time_empty
(
self
):
"""Check parsing of the empty string."""
"""Check parsing of the empty string."""
output
=
Video
Alpha
Descriptor
.
_parse_time
(
''
)
output
=
VideoDescriptor
.
_parse_time
(
''
)
self
.
assertEqual
(
output
,
''
)
self
.
assertEqual
(
output
,
''
)
def
test_parse_youtube
(
self
):
def
test_parse_youtube
(
self
):
"""Test parsing old-style Youtube ID strings into a dict."""
"""Test parsing old-style Youtube ID strings into a dict."""
youtube_str
=
'0.75:jNCf2gIqpeE,1.00:ZwkTiUPN0mg,1.25:rsq9auxASqI,1.50:kMyNdzVHHgg'
youtube_str
=
'0.75:jNCf2gIqpeE,1.00:ZwkTiUPN0mg,1.25:rsq9auxASqI,1.50:kMyNdzVHHgg'
output
=
Video
Alpha
Descriptor
.
_parse_youtube
(
youtube_str
)
output
=
VideoDescriptor
.
_parse_youtube
(
youtube_str
)
self
.
assertEqual
(
output
,
{
'0.75'
:
'jNCf2gIqpeE'
,
self
.
assertEqual
(
output
,
{
'0.75'
:
'jNCf2gIqpeE'
,
'1.00'
:
'ZwkTiUPN0mg'
,
'1.00'
:
'ZwkTiUPN0mg'
,
'1.25'
:
'rsq9auxASqI'
,
'1.25'
:
'rsq9auxASqI'
,
...
@@ -145,7 +145,7 @@ class VideoAlphaModuleLogicTest(LogicTest):
...
@@ -145,7 +145,7 @@ class VideoAlphaModuleLogicTest(LogicTest):
empty string.
empty string.
"""
"""
youtube_str
=
'0.75:jNCf2gIqpeE'
youtube_str
=
'0.75:jNCf2gIqpeE'
output
=
Video
Alpha
Descriptor
.
_parse_youtube
(
youtube_str
)
output
=
VideoDescriptor
.
_parse_youtube
(
youtube_str
)
self
.
assertEqual
(
output
,
{
'0.75'
:
'jNCf2gIqpeE'
,
self
.
assertEqual
(
output
,
{
'0.75'
:
'jNCf2gIqpeE'
,
'1.00'
:
''
,
'1.00'
:
''
,
'1.25'
:
''
,
'1.25'
:
''
,
...
@@ -158,8 +158,8 @@ class VideoAlphaModuleLogicTest(LogicTest):
...
@@ -158,8 +158,8 @@ class VideoAlphaModuleLogicTest(LogicTest):
youtube_str
=
'1.00:p2Q6BrNhdh8'
youtube_str
=
'1.00:p2Q6BrNhdh8'
youtube_str_hack
=
'1.0:p2Q6BrNhdh8'
youtube_str_hack
=
'1.0:p2Q6BrNhdh8'
self
.
assertEqual
(
self
.
assertEqual
(
Video
Alpha
Descriptor
.
_parse_youtube
(
youtube_str
),
VideoDescriptor
.
_parse_youtube
(
youtube_str
),
Video
Alpha
Descriptor
.
_parse_youtube
(
youtube_str_hack
)
VideoDescriptor
.
_parse_youtube
(
youtube_str_hack
)
)
)
def
test_parse_youtube_empty
(
self
):
def
test_parse_youtube_empty
(
self
):
...
@@ -167,7 +167,7 @@ class VideoAlphaModuleLogicTest(LogicTest):
...
@@ -167,7 +167,7 @@ class VideoAlphaModuleLogicTest(LogicTest):
Some courses have empty youtube attributes, so we should handle
Some courses have empty youtube attributes, so we should handle
that well.
that well.
"""
"""
self
.
assertEqual
(
Video
Alpha
Descriptor
.
_parse_youtube
(
''
),
self
.
assertEqual
(
VideoDescriptor
.
_parse_youtube
(
''
),
{
'0.75'
:
''
,
{
'0.75'
:
''
,
'1.00'
:
''
,
'1.00'
:
''
,
'1.25'
:
''
,
'1.25'
:
''
,
...
...
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