From f7d697d9bd80ae1ac1e77c505480a5bbd96eeac8 Mon Sep 17 00:00:00 2001 From: Antonin Date: Thu, 8 Jan 2026 12:50:07 +0100 Subject: [PATCH] =?UTF-8?q?=E2=9C=85(backend)=20fix=20flaky=20test=20in=20?= =?UTF-8?q?user=20search=20api?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Make sure the full is never John for the first user in order to make sure we always have only 2 users (as the search is performed on both the email and the full name). Fixes #1765 Signed-off-by: Anto59290 --- CHANGELOG.md | 4 ++++ src/backend/core/tests/test_api_users.py | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 518941fe..da5bde49 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,10 @@ and this project adheres to - ✨(backend) add documents/all endpoint with descendants #1553 - ✅(export) add PDF regression tests #1762 +### Fixed + +- ✅(backend) reduce flakiness on backend test #1769 + ## [4.3.0] - 2026-01-05 ### Added diff --git a/src/backend/core/tests/test_api_users.py b/src/backend/core/tests/test_api_users.py index 926e731b..f2a30e93 100644 --- a/src/backend/core/tests/test_api_users.py +++ b/src/backend/core/tests/test_api_users.py @@ -311,7 +311,7 @@ def test_api_users_list_query_short_queries(): """ Queries shorter than 5 characters should return an empty result set. """ - user = factories.UserFactory(email="paul@example.com") + user = factories.UserFactory(email="paul@example.com", full_name="Paul") client = APIClient() client.force_login(user)