From df2686dc638f3f06d2e32b87bb3a75974bae6a9c Mon Sep 17 00:00:00 2001 From: aarif Date: Mon, 30 Sep 2019 19:55:15 +0500 Subject: [PATCH] updated input to md5 method to properly hash the input in both python versions --- .../djangoapps/user_api/accounts/tests/test_image_helpers.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/openedx/core/djangoapps/user_api/accounts/tests/test_image_helpers.py b/openedx/core/djangoapps/user_api/accounts/tests/test_image_helpers.py index 97d95576f1..0deaa321d5 100644 --- a/openedx/core/djangoapps/user_api/accounts/tests/test_image_helpers.py +++ b/openedx/core/djangoapps/user_api/accounts/tests/test_image_helpers.py @@ -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)