Commit c61f2ddc by J. Cliff Dyer

Update xblock requirement to 1.0.0.

parent 9c6d94ad
...@@ -212,7 +212,7 @@ class UnitTestLibraries(CourseTestCase): ...@@ -212,7 +212,7 @@ class UnitTestLibraries(CourseTestCase):
response = self.client.get(make_url_for_lib(lib.location.library_key)) response = self.client.get(make_url_for_lib(lib.location.library_key))
self.assertEqual(response.status_code, 200) self.assertEqual(response.status_code, 200)
self.assertIn("<html", response.content) self.assertIn("<html", response.content)
self.assertIn(lib.display_name, response.content) self.assertIn(lib.display_name.encode('utf-8'), response.content)
@ddt.data('library-v1:Nonexistent+library', 'course-v1:Org+Course', 'course-v1:Org+Course+Run', 'invalid') @ddt.data('library-v1:Nonexistent+library', 'course-v1:Org+Course', 'course-v1:Org+Course+Run', 'invalid')
def test_invalid_keys(self, key_str): def test_invalid_keys(self, key_str):
......
...@@ -2370,7 +2370,7 @@ class CapaDescriptorTest(unittest.TestCase): ...@@ -2370,7 +2370,7 @@ class CapaDescriptorTest(unittest.TestCase):
def test_indexing_checkboxes(self): def test_indexing_checkboxes(self):
name = "Checkboxes" name = "Checkboxes"
descriptor = self._create_descriptor(self.sample_checkbox_problem_xml, name=name) descriptor = self._create_descriptor(self.sample_checkbox_problem_xml, name=name)
capa_content = textwrap.dedent(""" capa_content = textwrap.dedent(u"""
Title Title
Description Description
Example Example
...@@ -2384,7 +2384,8 @@ class CapaDescriptorTest(unittest.TestCase): ...@@ -2384,7 +2384,8 @@ class CapaDescriptorTest(unittest.TestCase):
""") """)
self.assertEquals(descriptor.problem_types, {"choiceresponse"}) self.assertEquals(descriptor.problem_types, {"choiceresponse"})
self.assertEquals( self.assertEquals(
descriptor.index_dictionary(), { descriptor.index_dictionary(),
{
'content_type': CapaDescriptor.INDEX_CONTENT_TYPE, 'content_type': CapaDescriptor.INDEX_CONTENT_TYPE,
'problem_types': ["choiceresponse"], 'problem_types': ["choiceresponse"],
'content': { 'content': {
......
...@@ -758,14 +758,14 @@ class CertificatesViewsTests(CommonCertificatesTestCase): ...@@ -758,14 +758,14 @@ class CertificatesViewsTests(CommonCertificatesTestCase):
CourseStaffRole(self.course.id).add_users(self.user) CourseStaffRole(self.course.id).add_users(self.user)
response = self.client.get(test_url + '?preview=honor') response = self.client.get(test_url + '?preview=honor')
self.assertNotIn(self.course.display_name, response.content) self.assertNotIn(self.course.display_name.encode('utf-8'), response.content)
self.assertIn('course_title_0', response.content) self.assertIn('course_title_0', response.content)
self.assertIn('Signatory_Title 0', response.content) self.assertIn('Signatory_Title 0', response.content)
# mark certificate inactive but accessing in preview mode. # mark certificate inactive but accessing in preview mode.
self._add_course_certificates(count=1, signatory_count=2, is_active=False) self._add_course_certificates(count=1, signatory_count=2, is_active=False)
response = self.client.get(test_url + '?preview=honor') response = self.client.get(test_url + '?preview=honor')
self.assertNotIn(self.course.display_name, response.content) self.assertNotIn(self.course.display_name.encode('utf-8'), response.content)
self.assertIn('course_title_0', response.content) self.assertIn('course_title_0', response.content)
self.assertIn('Signatory_Title 0', response.content) self.assertIn('Signatory_Title 0', response.content)
...@@ -786,7 +786,7 @@ class CertificatesViewsTests(CommonCertificatesTestCase): ...@@ -786,7 +786,7 @@ class CertificatesViewsTests(CommonCertificatesTestCase):
# user has already has certificate generated for 'honor' mode # user has already has certificate generated for 'honor' mode
# so let's try to preview in 'verified' mode. # so let's try to preview in 'verified' mode.
response = self.client.get(test_url + '?preview=verified') response = self.client.get(test_url + '?preview=verified')
self.assertNotIn(self.course.display_name, response.content) self.assertNotIn(self.course.display_name.encode('utf-8'), response.content)
self.assertIn('course_title_0', response.content) self.assertIn('course_title_0', response.content)
self.assertIn('Signatory_Title 0', response.content) self.assertIn('Signatory_Title 0', response.content)
......
...@@ -78,7 +78,7 @@ class TestLTI(BaseTestXmodule): ...@@ -78,7 +78,7 @@ class TestLTI(BaseTestXmodule):
'input_fields': self.correct_headers, 'input_fields': self.correct_headers,
'element_class': self.item_descriptor.category, 'element_class': self.item_descriptor.category,
'element_id': self.item_descriptor.location.html_id(), 'element_id': self.item_descriptor.location.html_id(),
'launch_url': 'http://www.example.com', # default value 'launch_url': u'http://www.example.com', # default value
'open_in_a_new_page': True, 'open_in_a_new_page': True,
'form_url': self.item_descriptor.xmodule_runtime.handler_url(self.item_descriptor, 'form_url': self.item_descriptor.xmodule_runtime.handler_url(self.item_descriptor,
'preview_handler').rstrip('/?'), 'preview_handler').rstrip('/?'),
......
...@@ -83,7 +83,7 @@ class TestVideoYouTube(TestVideo): ...@@ -83,7 +83,7 @@ class TestVideoYouTube(TestVideo):
"recordedYoutubeIsAvailable": True, "recordedYoutubeIsAvailable": True,
})), })),
'track': None, 'track': None,
'transcript_download_format': 'srt', 'transcript_download_format': u'srt',
'transcript_download_formats_list': [ 'transcript_download_formats_list': [
{'display_name': 'SubRip (.srt) file', 'value': 'srt'}, {'display_name': 'SubRip (.srt) file', 'value': 'srt'},
{'display_name': 'Text (.txt) file', 'value': 'txt'} {'display_name': 'Text (.txt) file', 'value': 'txt'}
...@@ -162,7 +162,7 @@ class TestVideoNonYouTube(TestVideo): ...@@ -162,7 +162,7 @@ class TestVideoNonYouTube(TestVideo):
"recordedYoutubeIsAvailable": True, "recordedYoutubeIsAvailable": True,
})), })),
'track': None, 'track': None,
'transcript_download_format': 'srt', 'transcript_download_format': u'srt',
'transcript_download_formats_list': [ 'transcript_download_formats_list': [
{'display_name': 'SubRip (.srt) file', 'value': 'srt'}, {'display_name': 'SubRip (.srt) file', 'value': 'srt'},
{'display_name': 'Text (.txt) file', 'value': 'txt'} {'display_name': 'Text (.txt) file', 'value': 'txt'}
...@@ -283,7 +283,7 @@ class TestGetHtmlMethod(BaseTestXmodule): ...@@ -283,7 +283,7 @@ class TestGetHtmlMethod(BaseTestXmodule):
'id': self.item_descriptor.location.html_id(), 'id': self.item_descriptor.location.html_id(),
'metadata': '', 'metadata': '',
'track': None, 'track': None,
'transcript_download_format': 'srt', 'transcript_download_format': u'srt',
'transcript_download_formats_list': [ 'transcript_download_formats_list': [
{'display_name': 'SubRip (.srt) file', 'value': 'srt'}, {'display_name': 'SubRip (.srt) file', 'value': 'srt'},
{'display_name': 'Text (.txt) file', 'value': 'txt'} {'display_name': 'Text (.txt) file', 'value': 'txt'}
...@@ -321,7 +321,7 @@ class TestGetHtmlMethod(BaseTestXmodule): ...@@ -321,7 +321,7 @@ class TestGetHtmlMethod(BaseTestXmodule):
}) })
expected_context.update({ expected_context.update({
'transcript_download_format': ( 'transcript_download_format': (
None if self.item_descriptor.track and self.item_descriptor.download_track else 'srt' None if self.item_descriptor.track and self.item_descriptor.download_track else u'srt'
), ),
'track': ( 'track': (
track_url if data['expected_track_url'] == u'a_sub_file.srt.sjson' else data['expected_track_url'] track_url if data['expected_track_url'] == u'a_sub_file.srt.sjson' else data['expected_track_url']
...@@ -405,7 +405,7 @@ class TestGetHtmlMethod(BaseTestXmodule): ...@@ -405,7 +405,7 @@ class TestGetHtmlMethod(BaseTestXmodule):
'id': self.item_descriptor.location.html_id(), 'id': self.item_descriptor.location.html_id(),
'metadata': self.default_metadata_dict, 'metadata': self.default_metadata_dict,
'track': None, 'track': None,
'transcript_download_format': 'srt', 'transcript_download_format': u'srt',
'transcript_download_formats_list': [ 'transcript_download_formats_list': [
{'display_name': 'SubRip (.srt) file', 'value': 'srt'}, {'display_name': 'SubRip (.srt) file', 'value': 'srt'},
{'display_name': 'Text (.txt) file', 'value': 'txt'} {'display_name': 'Text (.txt) file', 'value': 'txt'}
...@@ -528,7 +528,7 @@ class TestGetHtmlMethod(BaseTestXmodule): ...@@ -528,7 +528,7 @@ class TestGetHtmlMethod(BaseTestXmodule):
'handout': None, 'handout': None,
'id': self.item_descriptor.location.html_id(), 'id': self.item_descriptor.location.html_id(),
'track': None, 'track': None,
'transcript_download_format': 'srt', 'transcript_download_format': u'srt',
'transcript_download_formats_list': [ 'transcript_download_formats_list': [
{'display_name': 'SubRip (.srt) file', 'value': 'srt'}, {'display_name': 'SubRip (.srt) file', 'value': 'srt'},
{'display_name': 'Text (.txt) file', 'value': 'txt'} {'display_name': 'Text (.txt) file', 'value': 'txt'}
...@@ -702,7 +702,7 @@ class TestGetHtmlMethod(BaseTestXmodule): ...@@ -702,7 +702,7 @@ class TestGetHtmlMethod(BaseTestXmodule):
'handout': None, 'handout': None,
'id': self.item_descriptor.location.html_id(), 'id': self.item_descriptor.location.html_id(),
'track': None, 'track': None,
'transcript_download_format': 'srt', 'transcript_download_format': u'srt',
'transcript_download_formats_list': [ 'transcript_download_formats_list': [
{'display_name': 'SubRip (.srt) file', 'value': 'srt'}, {'display_name': 'SubRip (.srt) file', 'value': 'srt'},
{'display_name': 'Text (.txt) file', 'value': 'txt'} {'display_name': 'Text (.txt) file', 'value': 'txt'}
...@@ -816,7 +816,7 @@ class TestGetHtmlMethod(BaseTestXmodule): ...@@ -816,7 +816,7 @@ class TestGetHtmlMethod(BaseTestXmodule):
'id': None, 'id': None,
'metadata': self.default_metadata_dict, 'metadata': self.default_metadata_dict,
'track': None, 'track': None,
'transcript_download_format': 'srt', 'transcript_download_format': u'srt',
'transcript_download_formats_list': [ 'transcript_download_formats_list': [
{'display_name': 'SubRip (.srt) file', 'value': 'srt'}, {'display_name': 'SubRip (.srt) file', 'value': 'srt'},
{'display_name': 'Text (.txt) file', 'value': 'txt'} {'display_name': 'Text (.txt) file', 'value': 'txt'}
...@@ -1531,7 +1531,7 @@ class TestVideoWithBumper(TestVideo): ...@@ -1531,7 +1531,7 @@ class TestVideoWithBumper(TestVideo):
"recordedYoutubeIsAvailable": True, "recordedYoutubeIsAvailable": True,
})), })),
'track': None, 'track': None,
'transcript_download_format': 'srt', 'transcript_download_format': u'srt',
'transcript_download_formats_list': [ 'transcript_download_formats_list': [
{'display_name': 'SubRip (.srt) file', 'value': 'srt'}, {'display_name': 'SubRip (.srt) file', 'value': 'srt'},
{'display_name': 'Text (.txt) file', 'value': 'txt'} {'display_name': 'Text (.txt) file', 'value': 'txt'}
......
...@@ -481,7 +481,7 @@ class ShoppingCartViewsTests(SharedModuleStoreTestCase, XssTestMixin): ...@@ -481,7 +481,7 @@ class ShoppingCartViewsTests(SharedModuleStoreTestCase, XssTestMixin):
self.add_course_to_user_cart(self.course_key) self.add_course_to_user_cart(self.course_key)
resp = self.client.post(reverse('register_code_redemption', args=[self.reg_code]), HTTP_HOST='localhost') resp = self.client.post(reverse('register_code_redemption', args=[self.reg_code]), HTTP_HOST='localhost')
self.assertEqual(resp.status_code, 200) self.assertEqual(resp.status_code, 200)
self.assertIn(self.course.display_name, resp.content) self.assertIn(self.course.display_name.encode('utf-8'), resp.content)
@ddt.data(True, False) @ddt.data(True, False)
def test_reg_code_uses_unknown_mode(self, expired_mode): def test_reg_code_uses_unknown_mode(self, expired_mode):
...@@ -493,7 +493,7 @@ class ShoppingCartViewsTests(SharedModuleStoreTestCase, XssTestMixin): ...@@ -493,7 +493,7 @@ class ShoppingCartViewsTests(SharedModuleStoreTestCase, XssTestMixin):
self.add_course_to_user_cart(self.course_key) self.add_course_to_user_cart(self.course_key)
resp = self.client.post(reverse('register_code_redemption', args=[self.reg_code]), HTTP_HOST='localhost') resp = self.client.post(reverse('register_code_redemption', args=[self.reg_code]), HTTP_HOST='localhost')
self.assertEqual(resp.status_code, 200) self.assertEqual(resp.status_code, 200)
self.assertIn(self.course.display_name, resp.content) self.assertIn(self.course.display_name.encode('utf-8'), resp.content)
self.assertIn("error processing your redeem code", resp.content) self.assertIn("error processing your redeem code", resp.content)
def test_course_discount_for_valid_active_coupon_code(self): def test_course_discount_for_valid_active_coupon_code(self):
...@@ -1836,7 +1836,7 @@ class RegistrationCodeRedemptionCourseEnrollment(SharedModuleStoreTestCase): ...@@ -1836,7 +1836,7 @@ class RegistrationCodeRedemptionCourseEnrollment(SharedModuleStoreTestCase):
dashboard_url = reverse('dashboard') dashboard_url = reverse('dashboard')
response = self.client.get(dashboard_url) response = self.client.get(dashboard_url)
self.assertEquals(response.status_code, 200) self.assertEquals(response.status_code, 200)
self.assertIn(self.course.display_name, response.content) self.assertIn(self.course.display_name.encode('utf-8'), response.content)
@ddt.ddt @ddt.ddt
......
...@@ -211,7 +211,7 @@ py2neo==3.1.2 ...@@ -211,7 +211,7 @@ py2neo==3.1.2
# Support for plugins # Support for plugins
web-fragments==0.2.2 web-fragments==0.2.2
xblock==0.5.0 xblock==1.0.0
# Third Party XBlocks # Third Party XBlocks
edx-sga==0.6.2 edx-sga==0.6.2
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