Skip to content

Commit

Permalink
fixup! ✨(mailboxes) add webhook to dimail-api
Browse files Browse the repository at this point in the history
  • Loading branch information
mjeammet committed Jul 16, 2024
1 parent 9a8495b commit 309725b
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 22 deletions.
2 changes: 0 additions & 2 deletions src/backend/mailbox_manager/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -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']}"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 309725b

Please sign in to comment.