def test_add_recipient(self): from tgext.mailer.message import Message msg = Message("testing") msg.add_recipient("*****@*****.**") self.assertEqual(msg.recipients, ["*****@*****.**"])
def test_recipients_properly_initialized(self): from tgext.mailer.message import Message msg = Message(subject="subject") self.assertEqual(msg.recipients, []) msg2 = Message(subject="subject") msg2.add_recipient("*****@*****.**") self.assertEqual(len(msg.recipients), 0) msg3 = Message(subject="subject") msg3.add_recipient("*****@*****.**") self.assertEqual(len(msg.recipients), 0)