1
0
forked from ScoDoc/ScoDoc

Test unit. logo: désactive vérification contenu répertoire

This commit is contained in:
Emmanuel Viennet 2022-12-17 23:58:01 -03:00
parent ec35ee0ab9
commit 61ffb32b02

View File

@ -8,6 +8,7 @@ Utiliser comme:
from pathlib import Path from pathlib import Path
from shutil import copy from shutil import copy
import pytest
from _pytest.python_api import approx from _pytest.python_api import approx
import app import app
@ -167,8 +168,11 @@ def test_create_jpg_instead_of_png_logo(create_logos):
created.unlink(missing_ok=True) created.unlink(missing_ok=True)
@pytest.mark.skip(
reason="il peut y avoir d'autres fichiers logos sur les serveurs de dev"
)
def test_list_logo(create_logos): def test_list_logo(create_logos):
# test only existence of copied logos. We assumes that they are OK """Vérifie que nos logos sont présents et que ce sont les seuls."""
dept1, dept2, dept3 = create_logos dept1, dept2, dept3 = create_logos
logos = list_logos() logos = list_logos()
assert set(logos.keys()) == {dept1.id, dept2.id, None} assert set(logos.keys()) == {dept1.id, dept2.id, None}