Exemplo n.º 1
0
 def test_decode_QP(self):
     test_line =  '=??b?UmFwaGHrbA==?= DUPONT<*****@*****.**>'
     test = decode_QP(test_line)
     self.assertEquals(type(test), unicode)
     self.assertEquals(test, u'Raphaël DUPONT<*****@*****.**>')
 def test_decode_QP(self):
     test_line =  '=??b?UmFwaGHrbA==?= DUPONT<*****@*****.**>'
     test = decode_QP(test_line)
     self.assertEqual(type(test), unicode)
     self.assertEqual(test, u'Raphaël DUPONT<*****@*****.**>')
Exemplo n.º 3
0
 def test_decode_QP_ascii(self):
     test_line = 'test <*****@*****.**>'
     test = decode_QP(test_line)
     self.assertEqual(type(test), text_type)
     self.assertEqual(test, u'test <*****@*****.**>')
Exemplo n.º 4
0
 def test_decode_QP_utf8(self):
     test_line = '=?utf-8?q?o=C3=AEm?= <*****@*****.**>'
     test = decode_QP(test_line)
     self.assertEqual(type(test), text_type)
     self.assertEqual(test, u'oîm <*****@*****.**>')
Exemplo n.º 5
0
 def test_decode_QP_ascii(self):
     test_line = 'test <*****@*****.**>'
     test = decode_QP(test_line)
     self.assertEqual(type(test), text_type)
     self.assertEqual(test, u'test <*****@*****.**>')
Exemplo n.º 6
0
 def test_decode_QP_utf8(self):
     test_line = '=?utf-8?q?o=C3=AEm?= <*****@*****.**>'
     test = decode_QP(test_line)
     self.assertEqual(type(test), text_type)
     self.assertEqual(test, u'oîm <*****@*****.**>')