summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2007-08-30 14:02:43 (GMT)
committerGuido van Rossum <guido@python.org>2007-08-30 14:02:43 (GMT)
commit5a23cc5a01458c74f8c849f41c2aea0151716668 (patch)
tree522b5cd104208ac95de66193bfd51ad55cf214e2
parentd24fdbcff39d4470b4e4813e95f9e7b57078aa1f (diff)
downloadcpython-5a23cc5a01458c74f8c849f41c2aea0151716668.zip
cpython-5a23cc5a01458c74f8c849f41c2aea0151716668.tar.gz
cpython-5a23cc5a01458c74f8c849f41c2aea0151716668.tar.bz2
Two changes (not enough to make the test pass though) having to do with
the bytes() constructor when passing str.
-rw-r--r--Lib/test/test_smtplib.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/Lib/test/test_smtplib.py b/Lib/test/test_smtplib.py
index c2bd196..e0dcc86 100644
--- a/Lib/test/test_smtplib.py
+++ b/Lib/test/test_smtplib.py
@@ -400,7 +400,8 @@ class SMTPSimTests(TestCase):
for email, name in sim_users.items():
expected_known = (250, bytes('%s %s' %
- (name, smtplib.quoteaddr(email))))
+ (name, smtplib.quoteaddr(email)),
+ "ascii"))
self.assertEqual(smtp.vrfy(email), expected_known)
u = 'nobody@nowhere.com'
@@ -416,7 +417,7 @@ class SMTPSimTests(TestCase):
users = []
for m in members:
users.append('%s %s' % (sim_users[m], smtplib.quoteaddr(m)))
- expected_known = (250, bytes('\n'.join(users)))
+ expected_known = (250, bytes('\n'.join(users), "ascii"))
self.assertEqual(smtp.expn(listname), expected_known)
u = 'PSU-Members-List'