def test_get_auto_submitted(self): mail_buit = llegir_mail("mailbuit.txt") mail_auto = llegir_mail("mailauto.txt") self.assertTrue(mail_auto.es_missatge_automatic()) self.assertFalse(mail_buit.es_missatge_automatic())
def test_encoding_xungo(self): mail = llegir_mail("encoding-xungo.txt") body = mail.get_body() self.assertNotEquals("", body)
def test_get_body_buit(self): mail_buit = llegir_mail("mailbuit.txt") body = mail_buit.get_body() self.assertEquals("", body)
def test_treure_style(self): msg = llegir_mail("reply-mutipart-alternative.txt") html = msg.get_body() net = netejahtml.neteja_reply(html) self.assertFalse("text-decoration" in net)
def test_treure_comentaris(self): msg = llegir_mail("comentaris.txt") html = msg.get_body() net = netejahtml.neteja_nou(html) print net self.assertFalse("supportList" in net)
def test_treure_script(self): msg = llegir_mail("reply-mutipart-alternative.txt") html = msg.get_body() net = netejahtml.neteja_reply(html) self.assertFalse("alert" in net)