Mercurial > p > roundup > code
comparison test/test_mailer.py @ 5794:95a366d46065
Replace deprecated assertEquals with assertEqual and failUnlessRaises
with assertRaises.
| author | John Rouillard <rouilj@ieee.org> |
|---|---|
| date | Mon, 10 Jun 2019 21:27:17 -0400 |
| parents | bc2e682e0305 |
| children |
comparison
equal
deleted
inserted
replaced
| 5793:6aad7b194e63 | 5794:95a366d46065 |
|---|---|
| 3 | 3 |
| 4 from roundup import mailer | 4 from roundup import mailer |
| 5 | 5 |
| 6 class EncodingTestCase(unittest.TestCase): | 6 class EncodingTestCase(unittest.TestCase): |
| 7 def testEncoding(self): | 7 def testEncoding(self): |
| 8 a = lambda n, a, c, o: self.assertEquals(mailer.nice_sender_header(n, | 8 a = lambda n, a, c, o: self.assertEqual(mailer.nice_sender_header(n, |
| 9 a, c), o) | 9 a, c), o) |
| 10 a('ascii', 'ascii@test.com', 'iso8859-1', 'ascii <ascii@test.com>') | 10 a('ascii', 'ascii@test.com', 'iso8859-1', 'ascii <ascii@test.com>') |
| 11 a(u'café', 'ascii@test.com', 'iso8859-1', | 11 a(u'café', 'ascii@test.com', 'iso8859-1', |
| 12 '=?iso8859-1?q?caf=E9?= <ascii@test.com>') | 12 '=?iso8859-1?q?caf=E9?= <ascii@test.com>') |
| 13 a(u'café', 'ascii@test.com', 'utf-8', | 13 a(u'café', 'ascii@test.com', 'utf-8', |
