mirror of
https://github.com/pacnpal/django-anymail.git
synced 2025-12-20 03:41:05 -05:00
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:
@@ -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>'])
|
||||
|
||||
Reference in New Issue
Block a user