0002-misc-give-profile-images-a-.jpeg-extension-27645.patch
src/authentic2/attribute_kinds.py | ||
---|---|---|
125 | 125 |
h_computation.update(chunk) |
126 | 126 |
hexdigest = h_computation.hexdigest() |
127 | 127 |
stored_file = default_storage.save( |
128 |
os.path.join('profile-image', hexdigest), |
|
128 |
os.path.join('profile-image', hexdigest + '.jpeg'),
|
|
129 | 129 |
uploadedfile) |
130 | 130 |
return stored_file |
131 | 131 |
tests/test_attribute_kinds.py | ||
---|---|---|
411 | 411 |
response = form.submit() |
412 | 412 |
assert john().attributes.cityscape_image |
413 | 413 |
profile_filename = john().attributes.cityscape_image.name |
414 |
assert profile_filename.endswith('.jpeg') |
|
414 | 415 | |
415 | 416 |
# verify API serves absolute URL for profile images |
416 | 417 |
app.authorization = ('Basic', (admin.username, admin.username)) |
417 |
- |