def test_with_token(self): message = email_queue.generate_invite(u'h\u00e9llo Name', '*****@*****.**', '*****@*****.**', u'H\u00e9llo service', '99token99') text_content = message.get_payload()[0].get_payload(decode=True).decode('utf-8') self.assertTrue('/99token99' in text_content) html_content = message.get_payload()[1].get_payload(decode=True).decode('utf-8') self.assertTrue('/99token99' in html_content)
def test_simple(self): message = email_queue.generate_invite( u'h\u00e9llo Name', '*****@*****.**', '*****@*****.**', u'H\u00e9llo service', None) self.assertTrue(u'H\u00e9' in message['Subject']) self.assertEquals('*****@*****.**', message['Reply-To']) self.assertEquals('*****@*****.**', message['To']) self.assertTrue('charset="utf-8"' in message.get_payload()[0]['Content-Type'].lower()) self.assertTrue('charset="utf-8"' in message.get_payload()[1]['Content-Type'].lower()) self.assertTrue(u'H\u00e9' in message.get_payload()[0].get_payload(decode=True).decode('utf-8'))
def test_with_token(self): message = email_queue.generate_invite(u'h\u00e9llo Name', '*****@*****.**', '*****@*****.**', u'H\u00e9llo service', '99token99') text_content = message.get_payload()[0].get_payload( decode=True).decode('utf-8') self.assertTrue('/99token99' in text_content) html_content = message.get_payload()[1].get_payload( decode=True).decode('utf-8') self.assertTrue('/99token99' in html_content)
def test_simple(self): message = email_queue.generate_invite(u'h\u00e9llo Name', '*****@*****.**', '*****@*****.**', u'H\u00e9llo service', None) self.assertTrue(u'H\u00e9' in message['Subject']) self.assertEquals('*****@*****.**', message['Reply-To']) self.assertEquals('*****@*****.**', message['To']) self.assertTrue('charset="utf-8"' in message.get_payload()[0] ['Content-Type'].lower()) self.assertTrue('charset="utf-8"' in message.get_payload()[1] ['Content-Type'].lower()) self.assertTrue(u'H\u00e9' in message.get_payload()[0].get_payload( decode=True).decode('utf-8'))