示例#1
0
 def test_sendto_properly_set(self):
     msg = Message(subject="subject", recipients=["*****@*****.**"],
                   cc=["*****@*****.**"], bcc=["*****@*****.**"])
     self.assertEqual(len(msg.send_to), 3)
     msg.add_recipient("*****@*****.**")
     self.assertEqual(len(msg.send_to), 3)
示例#2
0
 def test_add_recipient(self):
     msg = Message("testing")
     msg.add_recipient("*****@*****.**")
     self.assertEqual(msg.recipients, ["*****@*****.**"])
示例#3
0
 def test_recipients_properly_initialized(self):
     msg = Message(subject="subject")
     self.assertEqual(msg.recipients, [])
     msg2 = Message(subject="subject")
     msg2.add_recipient("*****@*****.**")
     self.assertEqual(len(msg2.recipients), 1)