mirror of
https://github.com/pacnpal/django-anymail.git
synced 2025-12-20 03:41:05 -05:00
Flake8 clean
This commit is contained in:
@@ -315,4 +315,3 @@ class CatchCommonErrorsTests(TestBackendTestCase):
|
||||
self.message.reply_to = ugettext_lazy("single-reply-to@example.com")
|
||||
with self.assertRaisesMessage(TypeError, '"reply_to" attribute must be a list or other iterable'):
|
||||
self.message.send()
|
||||
|
||||
|
||||
@@ -526,4 +526,3 @@ class MailgunBackendDeprecationTests(MailgunBackendMockAPITestCase):
|
||||
with self.assertWarnsRegex(DeprecationWarning,
|
||||
r'anymail\.backends\.mailgun\.EmailBackend'):
|
||||
self.message.send()
|
||||
|
||||
|
||||
@@ -416,7 +416,7 @@ class MandrillBackendAnymailFeatureTests(MandrillBackendMockAPITestCase):
|
||||
# Anymail expands simple python dicts into the more-verbose
|
||||
# rcpt/values lists the Mandrill API uses
|
||||
"customer@example.com": {'cust_id': "67890", 'order_id': "54321"},
|
||||
"guest@example.com": {'cust_id': "94107", 'order_id': "43215"} ,
|
||||
"guest@example.com": {'cust_id': "94107", 'order_id': "43215"},
|
||||
}}}
|
||||
self.message.send()
|
||||
data = self.get_api_call_json()
|
||||
|
||||
@@ -106,4 +106,3 @@ class PostmarkDeliveryTestCase(WebhookTestCase):
|
||||
self.assertEqual(event.message_id, "f4830d10-9c35-4f0c-bca3-3d9b459821f8")
|
||||
self.assertEqual(event.recipient, "recipient@example.com")
|
||||
self.assertEqual(event.user_agent, "Mozilla/5.0 (Windows NT 5.1; rv:11.0) Gecko Firefox/11.0")
|
||||
|
||||
|
||||
@@ -599,9 +599,9 @@ class SendGridBackendAnymailFeatureTests(SendGridBackendMockAPITestCase):
|
||||
['"Recipient, Ltd." <to@example.com>'])
|
||||
data = self.get_api_call_json()
|
||||
self.assertEqual(data["personalizations"][0]["to"][0],
|
||||
{"email": "to@example.com", "name": "Recipient, Ltd."}) # no extra quotes on name
|
||||
{"email": "to@example.com", "name": "Recipient, Ltd."}) # no extra quotes on name
|
||||
self.assertEqual(data["from"],
|
||||
{"email": "from@example.com", "name": "Sender, Inc."})
|
||||
{"email": "from@example.com", "name": "Sender, Inc."})
|
||||
|
||||
|
||||
class SendGridBackendRecipientsRefusedTests(SendGridBackendMockAPITestCase):
|
||||
|
||||
@@ -112,7 +112,7 @@ class LazyCoercionTests(SimpleTestCase):
|
||||
|
||||
def test_force_dict(self):
|
||||
result = force_non_lazy_dict({'a': 1, 'b': ugettext_lazy(u"b"),
|
||||
'c': {'c1': ugettext_lazy(u"c1")}})
|
||||
'c': {'c1': ugettext_lazy(u"c1")}})
|
||||
self.assertEqual(result, {'a': 1, 'b': u"b", 'c': {'c1': u"c1"}})
|
||||
self.assertIsInstance(result['b'], six.text_type)
|
||||
self.assertIsInstance(result['c']['c1'], six.text_type)
|
||||
|
||||
@@ -167,8 +167,7 @@ class _AssertWarnsContext(object):
|
||||
continue
|
||||
if first_matching is None:
|
||||
first_matching = w
|
||||
if (self.expected_regex is not None and
|
||||
not self.expected_regex.search(str(w))):
|
||||
if self.expected_regex is not None and not self.expected_regex.search(str(w)):
|
||||
continue
|
||||
# store warning for later retrieval
|
||||
self.warning = w
|
||||
|
||||
Reference in New Issue
Block a user