@@ -42,28 +42,28 @@ def test_image_filaname_is_replaced_to_uuid_from_id(self):
4242 filename , _ = os .path .splitext (os .path .basename (p .image .name ))
4343 assert filename == str (new_uuid )
4444
45- def test_image_is_converted_to_webp (self ):
46- assert self .model ._meta .get_field ("image" )._original_spec .format == "WEBP "
45+ def test_image_is_converted_to_jpeg (self ):
46+ assert self .model ._meta .get_field ("image" )._original_spec .format == "JPEG "
4747
4848 # Check filename extension
4949 p = self .factory_cls (image__filename = "example.png" , image__format = "PNG" )
5050 _ , ext = os .path .splitext (os .path .basename (p .image .name ))
51- assert ext == ".webp "
51+ assert ext == ".jpg "
5252
53- # Check format is WEBP
54- assert Image .open (p .image ).format == "WEBP "
53+ # Check format is JPEG
54+ assert Image .open (p .image ).format == "JPEG "
5555
56- def test_image_is_resized_to_720p (self ):
57- p = self .factory_cls (image__width = 2049 , image__height = 1080 )
56+ def test_image_is_resized_to_1080p (self ):
57+ p = self .factory_cls (image__width = 3840 , image__height = 1620 )
5858
59- target_sizing_factor = 1080 / 720
59+ target_sizing_factor = 1620 / 1080
6060 # It should perform a downsizing for factor 1.5
6161
6262 # Metatada in the field
63- assert p .image .width == 2049 / target_sizing_factor
64- assert p .image .height == 720
63+ assert p .image .width == 3840 / target_sizing_factor
64+ assert p .image .height == 1080
6565
66- def test_image_is_not_resized_if_smaller_than_720p (self ):
66+ def test_image_is_not_resized_if_smaller_than_1080p (self ):
6767 p = self .factory_cls (image__width = 1080 , image__height = 600 )
6868
6969 assert p .image .width == 1080
0 commit comments