Skip to content
Snippets Groups Projects
Commit a22bcd58 authored by Awais Qureshi's avatar Awais Qureshi
Browse files

BOM-935

Fixing python3 ordering issue in acceptance tests.
parent 523bb0ea
No related branches found
No related tags found
No related merge requests found
......@@ -195,11 +195,11 @@ class AccountSettingsPageTest(AccountSettingsTestMixin, AcceptanceTest):
},
{
'title': 'Social Media Links',
'fields': [
'fields': sorted([
'Twitter Link',
'Facebook Link',
'LinkedIn Link',
]
])
},
{
'title': 'Delete My Account',
......@@ -207,7 +207,9 @@ class AccountSettingsPageTest(AccountSettingsTestMixin, AcceptanceTest):
},
]
self.assertEqual(self.account_settings_page.sections_structure(), expected_sections_structure)
sections_structure = self.account_settings_page.sections_structure()
sections_structure[2]['fields'] = sorted(sections_structure[2]['fields'])
self.assertEqual(sections_structure, expected_sections_structure)
def _test_readonly_field(self, field_id, title, value):
"""
......
......@@ -491,10 +491,22 @@ class OwnLearnerProfilePageTest(LearnerProfileTestMixin, AcceptanceTest):
self.assert_default_image_has_public_access(profile_page)
profile_page.upload_file(filename='generic_csv.csv')
self.assertEqual(
profile_page.profile_image_message,
"The file must be one of the following types: .gif, .png, .jpeg, .jpg."
self.assertIn(
"The file must be one of the following types:", profile_page.profile_image_message,
)
self.assertIn(
".png", profile_page.profile_image_message,
)
self.assertIn(
".gif", profile_page.profile_image_message,
)
self.assertIn(
".jpeg", profile_page.profile_image_message,
)
self.assertIn(
".jpg", profile_page.profile_image_message,
)
profile_page.visit()
self.assertTrue(profile_page.profile_has_default_image)
......
......@@ -179,8 +179,8 @@ class VideoEditorTest(CMSVideoBaseTest):
self.save_unit_settings()
self.edit_component()
self.open_advanced_tab()
self.assertEqual(self.video.translations(), ['zh', 'uk'])
self.assertEqual(list(self.video.caption_languages.keys()), ['zh', 'uk'])
self.assertEqual(sorted(self.video.translations()), sorted(['zh', 'uk']))
self.assertEqual(sorted(list(self.video.caption_languages.keys())), sorted(['zh', 'uk']))
zh_unicode_text = u"好 各位同学"
self.assertTrue(self.video.download_translation('zh', zh_unicode_text))
uk_unicode_text = u"Привіт, edX вітає вас."
......@@ -399,8 +399,8 @@ class VideoEditorTest(CMSVideoBaseTest):
self.assertTrue(self.video.is_captions_visible())
unicode_text = u"好 各位同学"
self.assertIn(unicode_text, self.video.captions_text)
self.assertEqual(list(self.video.caption_languages.keys()), [u'ab', u'uk'])
self.assertEqual(list(self.video.caption_languages.keys())[0], 'ab')
self.assertEqual(sorted(list(self.video.caption_languages.keys())), sorted([u'ab', u'uk']))
self.assertEqual(sorted(list(self.video.caption_languages.keys()))[0], 'ab')
def test_upload_transcript_with_BOM(self):
"""
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment