diff --git a/tests/print_file_test.py b/tests/print_file_test.py index b4de23a..667abba 100644 --- a/tests/print_file_test.py +++ b/tests/print_file_test.py @@ -129,11 +129,12 @@ def run(): sheet_order, sheet_row = wait_print(client, paid_order(client, trimmed)['id'], 'ready') assert any(line.endswith('Faixas vazias cortadas: 9,0 cm') for line in sheet_order['prumo']), sheet_order['prumo'] assert Decimal(sheet_order['snapshot']['items'][0]['billed_metres']) == 1, sheet_order['snapshot']['items'][0] - film = download_png(client, sheet_row['upload_id']) - assert film.size == (px(27), px(21) + px(1.5)), film.size + trimmed_film = download_png(client, sheet_row['upload_id']) + assert trimmed_film.size == (px(27), px(21) + px(1.5)), trimmed_film.size # 0,5 cm of margin above and below the art, which fills the rest. - assert film.getpixel((px(13), px(0.2)))[3] == 0 and film.getpixel((px(13), px(20.8)))[3] == 0 - assert film.getpixel((px(13), px(1))) == (30, 60, 200, 255) and film.getpixel((px(13), px(20))) == (30, 60, 200, 255) + assert trimmed_film.getpixel((px(13), px(0.2)))[3] == 0 and trimmed_film.getpixel((px(13), px(20.8)))[3] == 0 + assert trimmed_film.getpixel((px(13), px(1))) == (30, 60, 200, 255) + assert trimmed_film.getpixel((px(13), px(20))) == (30, 60, 200, 255) print('PASS: a ready sheet with its empty strips cut bills and prints only what is left') # Item 7: "Abrir e conferir" gets the file in pieces, the first of which is