mirror of
https://github.com/pacnpal/django-anymail.git
synced 2025-12-20 03:41:05 -05:00
Reformat code with automated tools
Apply standardized code style
This commit is contained in:
@@ -11,20 +11,32 @@ class DeprecatedSettingsTests(AnymailTestMixin, SimpleTestCase):
|
||||
@override_settings(ANYMAIL={"WEBHOOK_AUTHORIZATION": "abcde:12345"})
|
||||
def test_webhook_authorization(self):
|
||||
errors = check_deprecated_settings(None)
|
||||
self.assertEqual(errors, [checks.Error(
|
||||
"The ANYMAIL setting 'WEBHOOK_AUTHORIZATION' has been renamed 'WEBHOOK_SECRET' to improve security.",
|
||||
hint="You must update your settings.py.",
|
||||
id="anymail.E001",
|
||||
)])
|
||||
self.assertEqual(
|
||||
errors,
|
||||
[
|
||||
checks.Error(
|
||||
"The ANYMAIL setting 'WEBHOOK_AUTHORIZATION' has been renamed"
|
||||
" 'WEBHOOK_SECRET' to improve security.",
|
||||
hint="You must update your settings.py.",
|
||||
id="anymail.E001",
|
||||
)
|
||||
],
|
||||
)
|
||||
|
||||
@override_settings(ANYMAIL_WEBHOOK_AUTHORIZATION="abcde:12345", ANYMAIL={})
|
||||
def test_anymail_webhook_authorization(self):
|
||||
errors = check_deprecated_settings(None)
|
||||
self.assertEqual(errors, [checks.Error(
|
||||
"The ANYMAIL_WEBHOOK_AUTHORIZATION setting has been renamed ANYMAIL_WEBHOOK_SECRET to improve security.",
|
||||
hint="You must update your settings.py.",
|
||||
id="anymail.E001",
|
||||
)])
|
||||
self.assertEqual(
|
||||
errors,
|
||||
[
|
||||
checks.Error(
|
||||
"The ANYMAIL_WEBHOOK_AUTHORIZATION setting has been renamed"
|
||||
" ANYMAIL_WEBHOOK_SECRET to improve security.",
|
||||
hint="You must update your settings.py.",
|
||||
id="anymail.E001",
|
||||
)
|
||||
],
|
||||
)
|
||||
|
||||
|
||||
class InsecureSettingsTests(AnymailTestMixin, SimpleTestCase):
|
||||
|
||||
Reference in New Issue
Block a user