diff --git a/app/scodoc/sco_config_form.py b/app/scodoc/sco_config_form.py index d5ee87a9d1..f7ff47d72d 100644 --- a/app/scodoc/sco_config_form.py +++ b/app/scodoc/sco_config_form.py @@ -126,7 +126,7 @@ class AddLogoForm(FlaskForm): validators.Length( max=20, message="Un nom ne doit pas dépasser 20 caractères" ), - validators.required("Nom de logo requis (alphanumériques ou '-')"), + validators.DataRequired("Nom de logo requis (alphanumériques ou '-')"), ], ) upload = FileField( @@ -136,7 +136,7 @@ class AddLogoForm(FlaskForm): scu.LOGOS_IMAGES_ALLOWED_TYPES, f"n'accepte que les fichiers image {', '.join(scu.LOGOS_IMAGES_ALLOWED_TYPES)}", ), - validators.required("Fichier image manquant"), + validators.DataRequired("Fichier image manquant"), ], ) do_insert = SubmitField("ajouter une image") diff --git a/tests/ressources/test_logos/logo_A.jpg b/tests/ressources/test_logos/logo_A.jpg index 7770372c7f..1da64b66b6 100644 Binary files a/tests/ressources/test_logos/logo_A.jpg and b/tests/ressources/test_logos/logo_A.jpg differ diff --git a/tests/ressources/test_logos/logo_A1.jpg b/tests/ressources/test_logos/logo_A1.jpg index e645ef63d2..66ecf45f2b 100644 Binary files a/tests/ressources/test_logos/logo_A1.jpg and b/tests/ressources/test_logos/logo_A1.jpg differ diff --git a/tests/ressources/test_logos/logo_C.jpg b/tests/ressources/test_logos/logo_C.jpg index 108afc713d..523201bc17 100644 Binary files a/tests/ressources/test_logos/logo_C.jpg and b/tests/ressources/test_logos/logo_C.jpg differ diff --git a/tests/ressources/test_logos/logo_D.png b/tests/ressources/test_logos/logo_D.png index cc7276cdaa..d7a73011bd 100644 Binary files a/tests/ressources/test_logos/logo_D.png and b/tests/ressources/test_logos/logo_D.png differ diff --git a/tests/ressources/test_logos/logo_E.jpg b/tests/ressources/test_logos/logo_E.jpg index e51e7b46f6..64c60165fa 100644 Binary files a/tests/ressources/test_logos/logo_E.jpg and b/tests/ressources/test_logos/logo_E.jpg differ diff --git a/tests/ressources/test_logos/logos_1/logo_A.jpg b/tests/ressources/test_logos/logos_1/logo_A.jpg index 81179f9c35..6d183db160 100644 Binary files a/tests/ressources/test_logos/logos_1/logo_A.jpg and b/tests/ressources/test_logos/logos_1/logo_A.jpg differ diff --git a/tests/ressources/test_logos/logos_1/logo_B.jpg b/tests/ressources/test_logos/logos_1/logo_B.jpg index 2428dc4521..7c1708f15a 100644 Binary files a/tests/ressources/test_logos/logos_1/logo_B.jpg and b/tests/ressources/test_logos/logos_1/logo_B.jpg differ diff --git a/tests/ressources/test_logos/logos_2/logo_A.jpg b/tests/ressources/test_logos/logos_2/logo_A.jpg index 28d2a9c14a..130269a63e 100644 Binary files a/tests/ressources/test_logos/logos_2/logo_A.jpg and b/tests/ressources/test_logos/logos_2/logo_A.jpg differ diff --git a/tests/ressources/test_logos/logos_2/logo_A1.jpg b/tests/ressources/test_logos/logos_2/logo_A1.jpg index 5bdf7500cc..ee9da2ec48 100644 Binary files a/tests/ressources/test_logos/logos_2/logo_A1.jpg and b/tests/ressources/test_logos/logos_2/logo_A1.jpg differ diff --git a/tests/unit/test_logos.py b/tests/unit/test_logos.py index 6af3664895..b5cf42389f 100644 --- a/tests/unit/test_logos.py +++ b/tests/unit/test_logos.py @@ -133,8 +133,8 @@ def test_get_jpg_data(create_dept, create_logos): assert logo.logoname == "A" assert logo.suffix == "jpg" assert logo.filename == "A.jpg" - assert logo.size == (140, 121) - assert logo.mm == approx((5.74, 4.96), 0.1) + assert logo.size == (224, 131) + assert logo.mm == approx((9.38, 5.49), 0.1) def test_get_png_without_data(create_dept, create_logos): @@ -144,7 +144,7 @@ def test_get_png_without_data(create_dept, create_logos): assert logo.logoname == "D" assert logo.suffix == "png" assert logo.filename == "D.png" - assert logo.size == (121, 121) + assert logo.size == (140, 131) assert logo.density is None assert logo.mm is None