From 5d2e63fc18cc8e0ce16cd57a5c712dfe7cf679e7 Mon Sep 17 00:00:00 2001 From: Marie PUPO JEAMMET Date: Wed, 8 Jan 2025 15:06:17 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B(tests)=20fix=20flaky=20back-end=20?= =?UTF-8?q?test?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit fixed a test that would fail because of random auth user name being too close to tested names (assert would find 2 results instead of 1). Setting the name of auth user should fix the issue permanently. --- src/backend/core/tests/contacts/test_core_api_contacts_list.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/backend/core/tests/contacts/test_core_api_contacts_list.py b/src/backend/core/tests/contacts/test_core_api_contacts_list.py index 2ad299c..f3abe26 100644 --- a/src/backend/core/tests/contacts/test_core_api_contacts_list.py +++ b/src/backend/core/tests/contacts/test_core_api_contacts_list.py @@ -100,7 +100,7 @@ def test_api_contacts_list_authenticated_by_full_name(): Authenticated users should be able to search users with a case insensitive and partial query on the full name. """ - user = factories.UserFactory() + user = factories.UserFactory(name="Prudence Crandall") dave = factories.BaseContactFactory(full_name="David Bowman") nicole = factories.BaseContactFactory(full_name="Nicole Foole")