Commit ef56c490 by Peter Fogg

Update XML in old video tests. This change tags like <video…

Update XML in old video tests. This change tags like <video youtube="1.0:abcdefg"> to <video youtube_id_1_0="abcdefg".
parent 66ab6597
...@@ -323,8 +323,8 @@ class ImportTestCase(BaseCourseTestCase): ...@@ -323,8 +323,8 @@ class ImportTestCase(BaseCourseTestCase):
location = Location(["i4x", "edX", "toy", "video", "Welcome"]) location = Location(["i4x", "edX", "toy", "video", "Welcome"])
toy_video = modulestore.get_instance(toy_id, location) toy_video = modulestore.get_instance(toy_id, location)
two_toy_video = modulestore.get_instance(two_toy_id, location) two_toy_video = modulestore.get_instance(two_toy_id, location)
self.assertEqual(etree.fromstring(toy_video.data).get('youtube'), "1.0:p2Q6BrNhdh8") self.assertEqual(toy_video.youtube_id_1_0, "p2Q6BrNhdh8")
self.assertEqual(etree.fromstring(two_toy_video.data).get('youtube'), "1.0:p2Q6BrNhdh9") self.assertEqual(two_toy_video.youtube_id_1_0, "p2Q6BrNhdh9")
def test_colon_in_url_name(self): def test_colon_in_url_name(self):
"""Ensure that colons in url_names convert to file paths properly""" """Ensure that colons in url_names convert to file paths properly"""
......
...@@ -90,12 +90,12 @@ class VideoDescriptor(VideoFields, ...@@ -90,12 +90,12 @@ class VideoDescriptor(VideoFields,
stores_state = True stores_state = True
template_dir_name = "video" template_dir_name = "video"
metadata_attributes = RawDescriptor.metadata_attributes + ('youtube_id_1_0', # metadata_attributes = RawDescriptor.metadata_attributes + ('youtube_id_1_0',
'youtube_id_0_75', # 'youtube_id_0_75',
'youtube_id_1_25', # 'youtube_id_1_25',
'youtube_id_1_5') # 'youtube_id_1_5')
metadata_to_strip = RawDescriptor.metadata_to_strip + ('show_captions',) # metadata_to_strip = RawDescriptor.metadata_to_strip + ('show_captions',)
@property @property
def non_editable_metadata_fields(self): def non_editable_metadata_fields(self):
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
</vertical> </vertical>
<vertical filename="vertical_89" slug="vertical_89" graceperiod="1 day 12 hours 59 minutes 59 seconds" showanswer="attempted" rerandomize="never"/> <vertical filename="vertical_89" slug="vertical_89" graceperiod="1 day 12 hours 59 minutes 59 seconds" showanswer="attempted" rerandomize="never"/>
<vertical slug="vertical_94" graceperiod="1 day 12 hours 59 minutes 59 seconds" showanswer="attempted" rerandomize="never"> <vertical slug="vertical_94" graceperiod="1 day 12 hours 59 minutes 59 seconds" showanswer="attempted" rerandomize="never">
<video youtube="0.75:XNh13VZhThQ,1.0:XbDRmF6J0K0,1.25:JDty12WEQWk,1.50:wELKGj-5iyM" slug="What_s_next" name="What's next"/> <video youtube_id_0_75="XNh13VZhThQ" youtube_id_1_0="XbDRmF6J0K0" youtube_id_1_25="JDty12WEQWk" youtube_id_1_5="wELKGj-5iyM" slug="What_s_next" name="What's next"/>
<html slug="html_95">Minor correction: Six elements (five resistors)…</html> <html slug="html_95">Minor correction: Six elements (five resistors)…</html>
<customtag tag="S1" slug="discuss_96" impl="discuss"/> <customtag tag="S1" slug="discuss_96" impl="discuss"/>
</vertical> </vertical>
......
<sequential> <sequential>
<video youtube="1.50:8kARlsUt9lM,1.25:4cLA-IME32w,1.0:pFOrD8k9_p4,0.75:CcgAYu0n0bg" slug="S1V9_Demo_Setup_-_Lumped_Elements" name="S1V9: Demo Setup - Lumped Elements"/> <video youtube_id_1_5="8kARlsUt9lM" youtube_id_1_25="4cLA-IME32w" youtube_id_1_0="pFOrD8k9_p4" youtube_id_0_75="CcgAYu0n0bg" slug="S1V9_Demo_Setup_-_Lumped_Elements" name="S1V9: Demo Setup - Lumped Elements"/>
<customtag tag="S1" slug="discuss_59" impl="discuss"/> <customtag tag="S1" slug="discuss_59" impl="discuss"/>
<customtag page="29" slug="book_60" impl="book"/> <customtag page="29" slug="book_60" impl="book"/>
<customtag lecnum="1" slug="slides_61" impl="slides"/> <customtag lecnum="1" slug="slides_61" impl="slides"/>
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
<!-- UTF-8 characters are acceptable… HTML entities are not --> <!-- UTF-8 characters are acceptable… HTML entities are not -->
<h1>Inline content…</h1> <h1>Inline content…</h1>
</html> </html>
<video youtube="1.50:vl9xrfxcr38,1.25:qxNX4REGqx4,1.0:BGU1poJDgOY,0.75:8rK9vnpystQ" slug="S1V14_Summary" name="S1V14: Summary"/> <video youtube_id_1_5="vl9xrfxcr38" youtube_id_1_25="qxNX4REGqx4" youtube_id_1_0="BGU1poJDgOY" youtube_id_0_75="8rK9vnpystQ" slug="S1V14_Summary" name="S1V14: Summary"/>
<customtag tag="S1" slug="discuss_91" impl="discuss"/> <customtag tag="S1" slug="discuss_91" impl="discuss"/>
<customtag page="70" slug="book_92" impl="book"/> <customtag page="70" slug="book_92" impl="book"/>
<customtag lecnum="1" slug="slides_93" impl="slides"/> <customtag lecnum="1" slug="slides_93" impl="slides"/>
......
<sequential> <sequential>
<video youtube="0.75:3NIegrCmA5k,1.0:eLAyO33baQ8,1.25:m1zWi_sh4Aw,1.50:EG-fRTJln_E" slug="S2V1_Review_KVL_KCL" name="S2V1: Review KVL, KCL"/> <video youtube_id_0_75="3NIegrCmA5k" youtube_id_1_0="eLAyO33baQ8" youtube_id_1_25="m1zWi_sh4Aw" youtube_id_1_5="EG-fRTJln_E" slug="S2V1_Review_KVL_KCL" name="S2V1: Review KVL, KCL"/>
<customtag tag="S2" slug="discuss_95" impl="discuss"/> <customtag tag="S2" slug="discuss_95" impl="discuss"/>
<customtag page="54" slug="book_96" impl="book"/> <customtag page="54" slug="book_96" impl="book"/>
<customtag lecnum="2" slug="slides_97" impl="slides"/> <customtag lecnum="2" slug="slides_97" impl="slides"/>
......
<sequential> <sequential>
<video youtube="0.75:S_1NaY5te8Q,1.0:G_2F9wivspM,1.25:b-r7dISY-Uc,1.50:jjxHom0oXWk" slug="S2V2_Demo-_KVL_KCL" name="S2V2: Demo- KVL, KCL"/> <video youtube_id_0_75="S_1NaY5te8Q" youtube_id_1_0="G_2F9wivspM" youtube_id_1_25="b-r7dISY-Uc" youtube_id_1_5="jjxHom0oXWk" slug="S2V2_Demo-_KVL_KCL" name="S2V2: Demo- KVL, KCL"/>
<customtag tag="S2" slug="discuss_99" impl="discuss"/> <customtag tag="S2" slug="discuss_99" impl="discuss"/>
<customtag page="56" slug="book_100" impl="book"/> <customtag page="56" slug="book_100" impl="book"/>
<customtag lecnum="2" slug="slides_101" impl="slides"/> <customtag lecnum="2" slug="slides_101" impl="slides"/>
......
<video youtube="0.75:izygArpw-Qo,1.0:p2Q6BrNhdh8,1.25:1EeWXzPdhSA,1.50:rABDYkeK0x8" format="Video" display_name="Welcome…"/> <video youtube_id_0_75="izygArpw-Qo" youtube_id_1_0="p2Q6BrNhdh8" youtube_id_1_25="1EeWXzPdhSA" youtube_id_1_5="rABDYkeK0x8" format="Video" display_name="Welcome…"/>
<course name="A Simple Course" org="edX" course="simple" graceperiod="1 day 5 hours 59 minutes 59 seconds" slug="2012_Fall"> <course name="A Simple Course" org="edX" course="simple" graceperiod="1 day 5 hours 59 minutes 59 seconds" slug="2012_Fall">
<chapter name="Overview"> <chapter name="Overview">
<video name="Welcome" youtube="0.75:izygArpw-Qo,1.0:p2Q6BrNhdh8,1.25:1EeWXzPdhSA,1.50:rABDYkeK0x8"/> <video name="Welcome" youtube_id_0_75="izygArpw-Qo" youtube_id_1_0="p2Q6BrNhdh8" youtube_id_1_25="1EeWXzPdhSA" youtube_id_1_5="rABDYkeK0x8"/>
<videosequence format="Lecture Sequence" name="A simple sequence"> <videosequence format="Lecture Sequence" name="A simple sequence">
<html name="toylab" filename="toylab"/> <html name="toylab" filename="toylab"/>
<video name="S0V1: Video Resources" youtube="0.75:EuzkdzfR0i8,1.0:1bK-WdDi6Qw,1.25:0v1VzoDVUTM,1.50:Bxk_-ZJb240"/> <video name="S0V1: Video Resources" youtube_id_0_75="EuzkdzfR0i8" youtube_id_1_0="1bK-WdDi6Qw" youtube_id_1_25="0v1VzoDVUTM" youtube_id_1_5="Bxk_-ZJb240"/>
</videosequence> </videosequence>
<section name="Lecture 2"> <section name="Lecture 2">
<sequential> <sequential>
<video youtube="1.0:TBvX7HzxexQ"/> <video youtube_id_1_0="TBvX7HzxexQ"/>
<problem name="L1 Problem 1" points="1" type="lecture" showanswer="attempted" filename="L1_Problem_1" rerandomize="never"/> <problem name="L1 Problem 1" points="1" type="lecture" showanswer="attempted" filename="L1_Problem_1" rerandomize="never"/>
</sequential> </sequential>
</section> </section>
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
<problem type="lecture" showanswer="attempted" rerandomize="true" display_name="A simple coding problem" name="Simple coding problem" filename="ps01-simple" url_name="ps01-simple"/> <problem type="lecture" showanswer="attempted" rerandomize="true" display_name="A simple coding problem" name="Simple coding problem" filename="ps01-simple" url_name="ps01-simple"/>
</sequential> </sequential>
</section> </section>
<video name="Lost Video" youtube="1.0:TBvX7HzxexQ"/> <video name="Lost Video" youtube_id_1_0="TBvX7HzxexQ"/>
<sequential format="Lecture Sequence" url_name='test_sequence'> <sequential format="Lecture Sequence" url_name='test_sequence'>
<vertical url_name='test_vertical'> <vertical url_name='test_vertical'>
<html url_name='test_html'> <html url_name='test_html'>
......
...@@ -2,9 +2,9 @@ ...@@ -2,9 +2,9 @@
<chapter url_name="Overview"> <chapter url_name="Overview">
<videosequence url_name="Toy_Videos"> <videosequence url_name="Toy_Videos">
<html url_name="toylab"/> <html url_name="toylab"/>
<video url_name="Video_Resources" youtube="1.0:1bK-WdDi6Qw"/> <video url_name="Video_Resources" youtube_id_1_0="1bK-WdDi6Qw"/>
</videosequence> </videosequence>
<video url_name="Welcome" youtube="1.0:p2Q6BrNhdh8"/> <video url_name="Welcome" youtube_id_1_0="p2Q6BrNhdh8"/>
</chapter> </chapter>
<chapter url_name="Ch2"> <chapter url_name="Ch2">
<html url_name="test_html"> <html url_name="test_html">
......
...@@ -2,9 +2,9 @@ ...@@ -2,9 +2,9 @@
<chapter url_name="Overview"> <chapter url_name="Overview">
<videosequence url_name="Toy_Videos"> <videosequence url_name="Toy_Videos">
<html url_name="toylab"/> <html url_name="toylab"/>
<video url_name="Video_Resources" youtube="1.0:1bK-WdDi6Qw"/> <video url_name="Video_Resources" youtube_id_1_0="1bK-WdDi6Qw"/>
</videosequence> </videosequence>
<video url_name="Welcome" youtube="1.0:p2Q6BrNhdh8"/> <video url_name="Welcome" youtube_id_1_0="p2Q6BrNhdh8"/>
</chapter> </chapter>
<chapter url_name="Ch2"> <chapter url_name="Ch2">
<html url_name="test_html"> <html url_name="test_html">
......
<chapter> <chapter>
<video url_name="toyvideo" youtube="1.00:OEoXaMPEzfM"/> <video url_name="toyvideo" youtube_id_1_0="OEoXaMPEzfM"/>
</chapter> </chapter>
...@@ -2,11 +2,11 @@ ...@@ -2,11 +2,11 @@
<chapter url_name="Overview"> <chapter url_name="Overview">
<videosequence url_name="Toy_Videos"> <videosequence url_name="Toy_Videos">
<html url_name="secret:toylab"/> <html url_name="secret:toylab"/>
<video url_name="Video_Resources" youtube="1.0:1bK-WdDi6Qw"/> <video url_name="Video_Resources" youtube_id_1_0="1bK-WdDi6Qw"/>
</videosequence> </videosequence>
<video url_name="Welcome" youtube="1.0:p2Q6BrNhdh8"/> <video url_name="Welcome" youtube_id_1_0="p2Q6BrNhdh8"/>
<video url_name="video_123456789012" youtube="1.0:p2Q6BrNhdh8"/> <video url_name="video_123456789012" youtube_id_1_0="p2Q6BrNhdh8"/>
<video url_name="video_123456789012" youtube="1.0:p2Q6BrNhdh8"/> <video url_name="video_4f66f493ac8f" youtube_id_1_0="p2Q6BrNhdh8"/>
</chapter> </chapter>
<chapter url_name="secret:magic"/> <chapter url_name="secret:magic"/>
</course> </course>
<video youtube="1.0:1bK-WdDi6Qw" display_name="Video Resources"/> <video youtube_id_1_0="1bK-WdDi6Qw" display_name="Video Resources"/>
<video youtube="1.0:p2Q6BrNhdh9" display_name="Welcome"/> <video youtube_id_1_0="p2Q6BrNhdh9" display_name="Welcome"/>
...@@ -127,6 +127,7 @@ class ModuleRenderTestCase(LoginEnrollmentTestCase): ...@@ -127,6 +127,7 @@ class ModuleRenderTestCase(LoginEnrollmentTestCase):
class TestTOC(TestCase): class TestTOC(TestCase):
"""Check the Table of Contents for a course""" """Check the Table of Contents for a course"""
def setUp(self): def setUp(self):
self.maxDiff = None
# Toy courses should be loaded # Toy courses should be loaded
self.course_name = 'edX/toy/2012_Fall' self.course_name = 'edX/toy/2012_Fall'
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment