diff --git a/tests/test_cache.py b/tests/test_cache.py index ce4ad7f09f72cc2cffa5bfd55fec4063090d2743..127201901a11ee0cea1b29d8536da2cc27fb73e8 100644 --- a/tests/test_cache.py +++ b/tests/test_cache.py @@ -78,13 +78,15 @@ CREATE TABLE "transcriptions" ("id" TEXT NOT NULL PRIMARY KEY, "element_id" TEXT [ # No max_size: no resize (400, 600, 400, 600, None, "http://something/full/full/0/default.jpg"), + # No max_size: resize on bbox + (400, 600, 200, 100, None, "http://something/0,0,200,100/full/0/default.jpg"), # max_size equal to the image size, no resize (400, 600, 400, 600, 600, "http://something/full/full/0/default.jpg"), (600, 400, 600, 400, 600, "http://something/full/full/0/default.jpg"), (400, 400, 400, 400, 400, "http://something/full/full/0/default.jpg"), # max_size is smaller than the image, resize (400, 600, 400, 600, 400, "http://something/full/266,400/0/default.jpg"), - (400, 600, 200, 600, 400, "http://something/full/266,400/0/default.jpg"), + (400, 600, 200, 600, 400, "http://something/0,0,200,600/full/0/default.jpg"), (600, 400, 600, 400, 400, "http://something/full/400,266/0/default.jpg"), (400, 400, 400, 400, 200, "http://something/full/200,200/0/default.jpg"), # max_size above the image size, no resize @@ -118,9 +120,9 @@ def test_element_open_image( image=image, polygon=[ [0, 0], - [image_width, 0], - [image_width, image_height], - [0, image_height], + [polygon_width, 0], + [polygon_width, polygon_height], + [0, polygon_height], [0, 0], ], )