Merge pull request #21866 from edx/BOM-831

Updated the string input to md5 to make output compatible with both python versions - BOM-831
This commit is contained in:
Aarif
2019-10-09 15:40:33 +05:00
committed by GitHub

View File

@@ -74,8 +74,8 @@ class ProfileImageUrlTestCase(TestCase):
"""
self.user.profile.profile_image_uploaded_at = TEST_PROFILE_IMAGE_UPLOAD_DT
self.user.profile.save()
expected_name = hashlib.md5(
'secret' + text_type(self.user.username).encode('utf-8')).hexdigest()
expected_name = hashlib.md5((
'secret' + text_type(self.user.username)).encode('utf-8')).hexdigest()
actual_urls = get_profile_image_urls_for_user(self.user)
self.verify_urls(actual_urls, expected_name, is_default=False)