1
0
forked from ScoDoc/ScoDoc

mise a jour tests + images de test

This commit is contained in:
Jean-Marie Place 2021-12-11 17:05:38 +01:00
parent 23f1dc4ed2
commit 8a5c4b5ced
11 changed files with 5 additions and 5 deletions

View File

@ -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")

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.7 KiB

After

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.9 KiB

After

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.0 KiB

After

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 21 KiB

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.9 KiB

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.1 KiB

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.0 KiB

After

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.2 KiB

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.4 KiB

After

Width:  |  Height:  |  Size: 3.4 KiB

View File

@ -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