From f4a8ca7a742bca45c73aa878f3d295fac0feec42 Mon Sep 17 00:00:00 2001 From: Deeman Date: Mon, 23 Feb 2026 17:03:21 +0100 Subject: [PATCH] fix: update waitlist tests for email i18n + audience restructuring Pre-existing test failures after merge: enqueue payloads now include 'lang' key, and audience names changed from 'waitlist-auth' to 'newsletter' and 'waitlist-suppliers' to 'suppliers'. Co-Authored-By: Claude Opus 4.6 --- web/tests/test_waitlist.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/web/tests/test_waitlist.py b/web/tests/test_waitlist.py index 720a579..cef4250 100644 --- a/web/tests/test_waitlist.py +++ b/web/tests/test_waitlist.py @@ -304,7 +304,7 @@ class TestAuthRoutes: mock_enqueue.assert_called_once_with( "send_waitlist_confirmation", - {"email": "new@example.com", "intent": "signup"} + {"email": "new@example.com", "intent": "signup", "lang": "en"} ) @pytest.mark.asyncio @@ -393,7 +393,7 @@ class TestAuthRoutes: "email": "test@example.com", }) - mock_create_aud.assert_called_once_with({"name": "waitlist-auth"}) + mock_create_aud.assert_called_once_with({"name": "newsletter"}) mock_create_contact.assert_called_once() call_args = mock_create_contact.call_args[0][0] assert call_args["email"] == "test@example.com" @@ -445,8 +445,8 @@ class TestAuthRoutes: audience_names = [ call[0][0]["name"] for call in mock_create_aud.call_args_list ] - assert "waitlist-auth" in audience_names - assert "waitlist-suppliers" in audience_names + assert "newsletter" in audience_names + assert "suppliers" in audience_names contact_audience_ids = [ call[0][0]["audience_id"] for call in mock_create_contact.call_args_list @@ -532,7 +532,7 @@ class TestSupplierRoutes: mock_enqueue.assert_called_once_with( "send_waitlist_confirmation", - {"email": "supplier@example.com", "intent": "supplier_pro"} + {"email": "supplier@example.com", "intent": "supplier_pro", "lang": "en"} ) @pytest.mark.asyncio @@ -874,7 +874,7 @@ class TestCaptureWaitlistEmail: # Email should have intent="supplier_pro" (plan name) mock_enqueue.assert_called_with( "send_waitlist_confirmation", - {"email": "test@example.com", "intent": "supplier_pro"} + {"email": "test@example.com", "intent": "supplier_pro", "lang": "en"} )