Can't convert 'bytes' object to str implicitly
This commit is contained in:
Awais Qureshi
2019-10-10 16:06:17 +05:00
parent 19342524d5
commit 4387f753d5

View File

@@ -126,7 +126,7 @@ class UserAPITestCase(APITestCase):
template = '{root}/{filename}_{{size}}.{extension}'
if has_profile_image:
url_root = 'http://example-storage.com/profile-images'
filename = hashlib.md5('secret' + self.user.username.encode('utf-8')).hexdigest()
filename = hashlib.md5(('secret' + self.user.username).encode('utf-8')).hexdigest()
file_extension = 'jpg'
template += '?v={}'.format(TEST_PROFILE_IMAGE_UPLOADED_AT.strftime("%s"))
else: