Completed for a grade of four
This commit is contained in:
@@ -54,7 +54,7 @@ def main():
|
||||
thumbnail = client.call('GET', path + '/content?variant=thumbnail', actor=bob)['bytes']
|
||||
check(downloaded == original, 'original changed')
|
||||
check(jpeg_size(thumbnail) == (256, 160), 'incorrect thumbnail dimensions')
|
||||
variant = attachment['variants'][0]
|
||||
variant = next(item for item in attachment['variants'] if item['name'] == 'thumbnail')
|
||||
check(variant['sha256'] == hashlib.sha256(thumbnail).hexdigest(), 'thumbnail checksum mismatch')
|
||||
client.call('GET', path, 404, actor=eve)
|
||||
print(f"PASS: same accepted job reached ready; original unchanged; thumbnail JPEG 256x160 with matching checksum; attachment_id={attachment['id']}", flush=True)
|
||||
|
||||
Reference in New Issue
Block a user