Flake8 clean

This commit is contained in:
medmunds
2017-04-16 11:43:13 -07:00
parent 853a7cd31d
commit 8bdc67939a
15 changed files with 58 additions and 57 deletions

View File

@@ -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()

View File

@@ -526,4 +526,3 @@ class MailgunBackendDeprecationTests(MailgunBackendMockAPITestCase):
with self.assertWarnsRegex(DeprecationWarning,
r'anymail\.backends\.mailgun\.EmailBackend'):
self.message.send()

View File

@@ -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()

View File

@@ -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")

View File

@@ -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):

View File

@@ -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)

View File

@@ -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