SendGrid: improve to handling with merge_data

* Add merge_data integration test
* Simplify backend handling for this case
  (also fixes duplicated to's in all_recipients
  from previous fix)
This commit is contained in:
medmunds
2016-05-18 11:23:01 -07:00
parent 72d899460c
commit 995617a130
3 changed files with 26 additions and 11 deletions

View File

@@ -431,6 +431,7 @@ class SendGridBackendAnymailFeatureTests(SendGridBackendMockAPITestCase):
data = self.get_api_call_data()
smtpapi = self.get_smtpapi()
# For batch send, must set both to+toname *and* smtpapi['to']:
self.assertEqual(data['toname'], [' ', 'Bob'])
self.assertEqual(data['to'], ['alice@example.com', 'bob@example.com'])
self.assertEqual(smtpapi['to'], ['alice@example.com', 'Bob <bob@example.com>'])