From 83bec33bdb6ed8c2a542ccef9f3ac5f2691700d7 Mon Sep 17 00:00:00 2001 From: Marie PUPO JEAMMET Date: Fri, 16 May 2025 18:46:17 +0200 Subject: [PATCH] =?UTF-8?q?=E2=9C=8F=EF=B8=8F(typo)=20fix=20typos?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Did you know ? "Successful" actually takes two esses. --- .../tests/api/mailboxes/test_api_mailboxes_create.py | 4 ++-- src/backend/mailbox_manager/tests/fixtures/dimail.py | 6 +++--- .../mailbox_manager/tests/test_utils_dimail_client.py | 2 +- src/backend/mailbox_manager/utils/dimail.py | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/backend/mailbox_manager/tests/api/mailboxes/test_api_mailboxes_create.py b/src/backend/mailbox_manager/tests/api/mailboxes/test_api_mailboxes_create.py index 8ffce2b..04e65f9 100644 --- a/src/backend/mailbox_manager/tests/api/mailboxes/test_api_mailboxes_create.py +++ b/src/backend/mailbox_manager/tests/api/mailboxes/test_api_mailboxes_create.py @@ -550,7 +550,7 @@ def test_api_mailboxes__domain_owner_or_admin_successful_creation_and_provisioni """ Domain owner/admin should be able to create mailboxes. Provisioning API should be called when owner/admin makes a call. - Succesfull 201 response from dimail should trigger mailbox creation on our side. + successful 201 response from dimail should trigger mailbox creation on our side. """ # creating all needed objects access = factories.MailDomainAccessFactory(role=role) @@ -805,7 +805,7 @@ def test_api_mailboxes__send_correct_logger_infos(mock_info, mock_error): assert not mock_error.called # Check all expected log messages are present, order doesn't matter expected_messages = { - ("Token succesfully granted by mail-provisioning API.",), + ("Token successfully granted by mail-provisioning API.",), ( "Mailbox successfully created on domain %s by user %s", str(access.domain), diff --git a/src/backend/mailbox_manager/tests/fixtures/dimail.py b/src/backend/mailbox_manager/tests/fixtures/dimail.py index 5056eb9..d980df9 100644 --- a/src/backend/mailbox_manager/tests/fixtures/dimail.py +++ b/src/backend/mailbox_manager/tests/fixtures/dimail.py @@ -7,7 +7,7 @@ import json def response_user_created(user_sub): - """mimic dimail response upon succesfull user creation.""" + """mimic dimail response upon successful user creation.""" return json.dumps( { "name": user_sub, @@ -297,7 +297,7 @@ TOKEN_OK = json.dumps({"access_token": "token", "token_type": "bearer"}) def response_allows_created(user_name, domain_name): - """mimic dimail response upon succesfull allows creation. + """mimic dimail response upon successful allows creation. Dimail expects a name but our names are ProConnect's uuids.""" return json.dumps({"user": user_name, "domain": domain_name}) @@ -306,5 +306,5 @@ def response_allows_created(user_name, domain_name): def response_mailbox_created(email_address): - """mimic dimail response upon succesfull mailbox creation.""" + """mimic dimail response upon successful mailbox creation.""" return json.dumps({"email": email_address, "password": "password"}) diff --git a/src/backend/mailbox_manager/tests/test_utils_dimail_client.py b/src/backend/mailbox_manager/tests/test_utils_dimail_client.py index 2eeb390..162bfe6 100644 --- a/src/backend/mailbox_manager/tests/test_utils_dimail_client.py +++ b/src/backend/mailbox_manager/tests/test_utils_dimail_client.py @@ -388,7 +388,7 @@ def test_dimail__send_pending_mailboxes(caplog): assert mailbox2.status == enums.MailboxStatusChoices.ENABLED log_messages = [msg.message for msg in caplog.records] - assert "Token succesfully granted by mail-provisioning API." in log_messages + assert "Token successfully granted by mail-provisioning API." in log_messages assert ( f"Mailbox successfully created on domain {domain.name} by user None" in log_messages diff --git a/src/backend/mailbox_manager/utils/dimail.py b/src/backend/mailbox_manager/utils/dimail.py index 0e30c9e..e22306d 100644 --- a/src/backend/mailbox_manager/utils/dimail.py +++ b/src/backend/mailbox_manager/utils/dimail.py @@ -71,7 +71,7 @@ class DimailAPIClient: "Content-Type": "application/json", "Authorization": f"Bearer {response.json()['access_token']}", } - logger.info("Token succesfully granted by mail-provisioning API.") + logger.info("Token successfully granted by mail-provisioning API.") return headers if response.status_code == status.HTTP_403_FORBIDDEN: