Exemplo n.º 1
0
 def test_smtpapiheader_addTo(self):
     """Test SendGrid SMTP header with recipients"""
     expected = 'X-SMTPAPI: {"to": ["*****@*****.**", ' + \
         '"*****@*****.**", "*****@*****.**"]}'
     tos = ['*****@*****.**',
            '*****@*****.**',
            '*****@*****.**']
     h = SmtpApiHeader()
     h.add_to(tos)
     # remember we are testing a string against a string
     self.assertEqual(h.__str__(), expected)