From b70151a30f4114ccb5f7d4e8b4cb570a2f403c13 Mon Sep 17 00:00:00 2001 From: Matthew Elwell Date: Thu, 2 Apr 2026 18:12:03 +0100 Subject: [PATCH] fix(tests): use unique email in flaky custom auth integration test The test was using a hardcoded `test@example.com` that appears in 15+ other tests in the same file. Under certain xdist worker orderings this caused a 400 "Email already exists" validation error instead of the expected 201, making the test flaky. Co-Authored-By: Claude Sonnet 4.6 --- .../custom_auth/end_to_end/test_custom_auth_integration.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/api/tests/integration/custom_auth/end_to_end/test_custom_auth_integration.py b/api/tests/integration/custom_auth/end_to_end/test_custom_auth_integration.py index 85dbadb3e975..2d1c2b330f04 100644 --- a/api/tests/integration/custom_auth/end_to_end/test_custom_auth_integration.py +++ b/api/tests/integration/custom_auth/end_to_end/test_custom_auth_integration.py @@ -619,11 +619,11 @@ def test_delete_token__valid_token__returns_no_content_and_invalidates( assert client.delete(delete_token_url).status_code == status.HTTP_401_UNAUTHORIZED -def test_register__with_sign_up_type__stores_sign_up_type(client, db, settings): # type: ignore[no-untyped-def] +def test_register__with_sign_up_type__stores_sign_up_type(client, db): # type: ignore[no-untyped-def] # Given password = FFAdminUser.objects.make_random_password() sign_up_type = "NO_INVITE" - email = "test@example.com" + email = f"test-{uuid.uuid4()}@example.com" register_data = { "email": email, "password": password,