🐛(dimail) fix broken auth while resetting passwords
Dimail client's "reset password" method was using basic auth while dimail expects a token for this endpoint. Fixed it.
This commit is contained in:
committed by
Marie
parent
83bec33bdb
commit
fce9b1e490
@@ -124,6 +124,12 @@ def test_api_mailboxes__reset_password_admin_successful(role):
|
||||
client.force_login(access.user)
|
||||
dimail_url = settings.MAIL_PROVISIONING_API_URL
|
||||
|
||||
responses.add(
|
||||
responses.GET,
|
||||
f"{dimail_url}/token/",
|
||||
body=dimail.TOKEN_OK,
|
||||
status=200,
|
||||
)
|
||||
responses.add(
|
||||
responses.POST,
|
||||
f"{dimail_url}/domains/{mail_domain.name}/mailboxes/{mailbox.local_part}/reset_password/",
|
||||
@@ -169,6 +175,12 @@ def test_api_mailboxes__reset_password_connexion_failed():
|
||||
client.force_login(access.user)
|
||||
|
||||
dimail_url = settings.MAIL_PROVISIONING_API_URL
|
||||
responses.add(
|
||||
responses.GET,
|
||||
f"{dimail_url}/token/",
|
||||
body=dimail.TOKEN_OK,
|
||||
status=200,
|
||||
)
|
||||
responses.add(
|
||||
responses.POST,
|
||||
f"{dimail_url}/domains/{mail_domain.name}/mailboxes/{mailbox.local_part}/reset_password/",
|
||||
|
||||
Reference in New Issue
Block a user