-
-
Notifications
You must be signed in to change notification settings - Fork 3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
remove email add notification, change notification setting name
- Loading branch information
varun kumar
committed
Dec 4, 2023
1 parent
e0275cf
commit 1e1dfaa
Showing
9 changed files
with
14 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -364,23 +364,7 @@ def test_confirm_email_with_same_user_logged_in(self): | |
self.assertEqual(user, resp.wsgi_request.user) | ||
|
||
|
||
@patch("allauth.account.app_settings.ACCOUNT_EMAIL_NOTIFICATIONS", True) | ||
def test_notification_on_email_add(auth_client, user, client): | ||
settings.ACCOUNT_MAX_EMAIL_ADDRESSES = 2 | ||
client.force_login(user) | ||
response = client.post( | ||
reverse("account_email"), | ||
{"email": "[email protected]", "action_add": ""}, | ||
**{ | ||
"HTTP_USER_AGENT": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.3" | ||
} | ||
) | ||
assert response.status_code == 302 | ||
assert len(mail.outbox) == 2 | ||
assert "Email address has been added." in mail.outbox[1].body | ||
|
||
|
||
@patch("allauth.account.app_settings.ACCOUNT_EMAIL_NOTIFICATIONS", True) | ||
@patch("allauth.account.app_settings.EMAIL_NOTIFICATIONS", True) | ||
def test_notification_on_email_remove(auth_client, user): | ||
secondary = EmailAddress.objects.create( | ||
email="[email protected]", user=user, verified=False, primary=False | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -301,7 +301,7 @@ def _password_set_or_change_redirect(self, urlname, usable_password): | |
return self.client.get(reverse(urlname)) | ||
|
||
|
||
@patch("allauth.account.app_settings.ACCOUNT_EMAIL_NOTIFICATIONS", True) | ||
@patch("allauth.account.app_settings.EMAIL_NOTIFICATIONS", True) | ||
def test_notification_on_password_change(user_factory, client): | ||
user = user_factory( | ||
email="[email protected]", | ||
|
@@ -325,7 +325,7 @@ def test_notification_on_password_change(user_factory, client): | |
assert "Your password has been changed" in mail.outbox[0].body | ||
|
||
|
||
@patch("allauth.account.app_settings.ACCOUNT_EMAIL_NOTIFICATIONS", True) | ||
@patch("allauth.account.app_settings.EMAIL_NOTIFICATIONS", True) | ||
def test_notification_on_password_reset(user_factory, client, settings): | ||
user = user_factory( | ||
email="[email protected]", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.