diff --git a/src/backend/mailbox_manager/models.py b/src/backend/mailbox_manager/models.py index ac02b0663..9a1f940d2 100644 --- a/src/backend/mailbox_manager/models.py +++ b/src/backend/mailbox_manager/models.py @@ -95,8 +95,6 @@ def get_headers(self): "This secret does not allow for a new token." ) - # import pdb; pdb.set_trace() - if "access_token" in response.json(): headers["Authorization"] = f"Bearer {response.json()['access_token']}" 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 2f01c8719..3bdd58a02 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 @@ -31,26 +31,6 @@ def test_api_mailboxes__create_anonymous_forbidden(): assert not models.Mailbox.objects.exists() -def test_api_mailboxes__create_domain_does_not_exist(): - """ - Users should not be able to send requests to a non-existing domain. - """ - user = core_factories.UserFactory() - - client = APIClient() - client.force_login(user) - mailbox_data = serializers.MailboxSerializer(factories.MailboxFactory.build()).data - mailbox_data["domain"] = "nonexistent.domain" - - response = client.post( - "/api/v1.0/mail-domains/nonexistent.domain/mailboxes/", - mailbox_data, - format="json", - ) - assert response.status_code == status.HTTP_404_NOT_FOUND - assert response.json() == {"detail": "Not found."} - - def test_api_mailboxes__create_authenticated_missing_fields(): """ Authenticated users should not be able to create mailboxes