Пример #1
0
 def test_multiple_recipients_delivered_to(self):
     email_parser = EmailParser(self.log)
     msg = {
         "Delivered-To":
         "<*****@*****.**> bob smith, <*****@*****.**> robert the bruce"
     }
     rcpt = email_parser.get_recipients(msg)
     self.assertEqual(rcpt,
                      ["*****@*****.**", "*****@*****.**"])
Пример #2
0
 def test_recipients_not_available(self):
     email_parser = EmailParser(self.log)
     msg = {}
     rcpt = email_parser.get_recipients(msg)
     self.assertEqual(rcpt, [])
Пример #3
0
 def test_no_recipients(self):
     email_parser = EmailParser(self.log)
     msg = {"To": ""}
     rcpt = email_parser.get_recipients(msg)
     self.assertEqual(rcpt, [])
Пример #4
0
 def test_single_recipient(self):
     email_parser = EmailParser(self.log)
     msg = {"To": "*****@*****.**"}
     rcpt = email_parser.get_recipients(msg)
     self.assertEqual(rcpt, ["*****@*****.**"])