Skip to content
Snippets Groups Projects
Unverified Commit 65eebe63 authored by Feanil Patel's avatar Feanil Patel
Browse files

Hash byte strings.

parent 32753882
No related branches found
No related tags found
No related merge requests found
...@@ -531,7 +531,7 @@ class ProfileImageTestMixin(object): ...@@ -531,7 +531,7 @@ class ProfileImageTestMixin(object):
Returns the expected user profile data for a given username Returns the expected user profile data for a given username
""" """
url = 'http://example-storage.com/profile-images/{filename}_{{size}}.jpg?v={timestamp}'.format( url = 'http://example-storage.com/profile-images/{filename}_{{size}}.jpg?v={timestamp}'.format(
filename=hashlib.md5('secret' + username).hexdigest(), filename=hashlib.md5(b'secret' + username.encode('utf-8')).hexdigest(),
timestamp=self.TEST_PROFILE_IMAGE_UPLOADED_AT.strftime("%s") timestamp=self.TEST_PROFILE_IMAGE_UPLOADED_AT.strftime("%s")
) )
return { return {
......
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