From 3f7f4172b5ed3cc169f94fdf25a169b7eaa721e7 Mon Sep 17 00:00:00 2001 From: Jean-Marie PLACE Date: Sat, 12 Nov 2022 11:29:20 +0100 Subject: [PATCH] =?UTF-8?q?tol=C3=A8re=20les=20logos=20surnum=C3=A9raires?= =?UTF-8?q?=20lors=20des=20tests?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tests/api/test_api_logos.py | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/tests/api/test_api_logos.py b/tests/api/test_api_logos.py index f8b497579..9ae59e87f 100644 --- a/tests/api/test_api_logos.py +++ b/tests/api/test_api_logos.py @@ -66,9 +66,10 @@ def test_global_logos(api_admin_headers): response = client.get(API_URL + "/logos", headers=headers) assert response.status_code == 200 assert response.json is not None - assert ( - len(response.json) == 4 - ) # 4 items in fakelogo context: ['header', 'footer', 'logo_B', 'logo_C'] + assert "header" in response.json + assert "footer" in response.json + assert "B" in response.json + assert "C" in response.json def test_local_by_id_logos(api_admin_headers): @@ -80,9 +81,8 @@ def test_local_by_id_logos(api_admin_headers): response = client.get(API_URL + "/departement/id/1/logos", headers=headers) assert response.status_code == 200 assert response.json is not None - assert ( - len(response.json) == 2 - ) # 2 items in dept(1, TAPI) fakelogo context: ['logo_A', 'logo_D'] + assert "A" in response.json + assert "D" in response.json def test_local_by_name_logos(api_admin_headers): @@ -94,9 +94,8 @@ def test_local_by_name_logos(api_admin_headers): response = client.get(API_URL + "/departement/TAPI/logos", headers=headers) assert response.status_code == 200 assert response.json is not None - assert ( - len(response.json) == 2 - ) # 2 items in dept(1, TAPI) fakelogo context: ['logo_A', 'logo_D'] + assert "A" in response.json + assert "D" in response.json def test_local_png_by_id_logo(api_admin_headers):