image resizing: Refactor some decisions into resize_tool.

Loading the thumb/medium sizes from the config, saving
things to the db, and loading the image is now all done by
resize_tool. It still calls resize_image for the actual
work.
This commit is contained in:
Elrond
2013-04-21 14:45:40 +02:00
parent f96c284e0a
commit 3b359dddc7
2 changed files with 38 additions and 29 deletions

View File

@@ -286,7 +286,7 @@ class TestSubmission:
# Does the processed image have a good filename?
filename = os.path.join(
public_store_dir,
*media.media_files.get(key, []))
*media.media_files[key])
assert filename.endswith('_' + basename)
# Is it smaller than the last processed image we looked at?
size = os.stat(filename).st_size