summaryrefslogtreecommitdiffstats
path: root/Lib/email/test
diff options
context:
space:
mode:
authorBarry Warsaw <barry@python.org>2007-08-30 02:10:49 (GMT)
committerBarry Warsaw <barry@python.org>2007-08-30 02:10:49 (GMT)
commit8b3d659692b6d092991dc3b5b4042547f885fa8c (patch)
tree49fc0c7a89c31479389f2dfb38d71f519ba4cb23 /Lib/email/test
parentce36ad8a467d914eb5c91f33835b9eaea18ee93b (diff)
downloadcpython-8b3d659692b6d092991dc3b5b4042547f885fa8c.zip
cpython-8b3d659692b6d092991dc3b5b4042547f885fa8c.tar.gz
cpython-8b3d659692b6d092991dc3b5b4042547f885fa8c.tar.bz2
Fix a more bytes/str confusion.
Use str.encode('raw-unicode-escape') consistently instead of bytes(string). Remove the convert_eols argument from base64mime.decode(). This matches previous API changes done to the quoprimime module.
Diffstat (limited to 'Lib/email/test')
-rw-r--r--Lib/email/test/test_email.py6
1 files changed, 2 insertions, 4 deletions
diff --git a/Lib/email/test/test_email.py b/Lib/email/test/test_email.py
index fc8224a..981441c 100644
--- a/Lib/email/test/test_email.py
+++ b/Lib/email/test/test_email.py
@@ -2531,10 +2531,8 @@ class TestBase64(unittest.TestCase):
def test_decode(self):
eq = self.assertEqual
- eq(base64mime.decode(''), '')
+ eq(base64mime.decode(''), b'')
eq(base64mime.decode('aGVsbG8='), b'hello')
- eq(base64mime.decode('aGVsbG8=', 'X'), b'hello')
- eq(base64mime.decode('aGVsbG8NCndvcmxk\n', 'X'), b'helloXworld')
def test_encode(self):
eq = self.assertEqual
@@ -2844,7 +2842,7 @@ class TestHeader(TestEmailBase):
def test_empty_header_encode(self):
h = Header()
self.assertEqual(h.encode(), '')
-
+
def test_header_ctor_default_args(self):
eq = self.ndiffAssertEqual
h = Header()