From 9e31345cf78a40010dff96cad779a0884b9681e4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cau=C3=AA=20Faleiros?= Date: Wed, 18 Nov 2026 13:35:38 -0300 Subject: [PATCH] test: the trimmed sheet in the print file test is 152 DPI, above the server's 96 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The server refused the 25 DPI test sheet before payment ("abaixo do mínimo de 96 DPI"), as it should. Co-Authored-By: Claude Opus 5.5 (1M context) --- tests/print_file_test.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/tests/print_file_test.py b/tests/print_file_test.py index fcb22f7..c66754a 100644 --- a/tests/print_file_test.py +++ b/tests/print_file_test.py @@ -111,10 +111,11 @@ def run(): # sends what the Site cut from the top and bottom of a 27 x 30 cm UV sheet # with 20 cm of art in the middle, as web/site-upload.js aplicaCorte does. # The order bills and prints the 21 cm left, the art whole. - sheet = Image.new('RGBA', (270, 300)) - sheet.paste(Image.new('RGBA', (230, 200), (30, 60, 200, 255)), (20, 50)) + # 60 px per cm (152 DPI, above the 96 the Site and the server require). + sheet = Image.new('RGBA', (1620, 1800)) + sheet.paste(Image.new('RGBA', (1380, 1200), (30, 60, 200, 255)), (120, 300)) buffer = io.BytesIO() - sheet.save(buffer, 'PNG', dpi=(25.4, 25.4)) + sheet.save(buffer, 'PNG', dpi=(152.4, 152.4)) sheet_upload = upload_bytes(client, buffer.getvalue(), name='LOCAL-TRIMMED-SHEET.png') trimmed = {'mode': 'uvfile', 'metres': '0.21', 'grade': 90, 'uploads': [sheet_upload], 'production': {'version': 3, 'film_width_cm': 27, 'height_cm': 21,