Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 5a23cc5

Browse files
committed
Two changes (not enough to make the test pass though) having to do with
the bytes() constructor when passing str.
1 parent d24fdbc commit 5a23cc5

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

Lib/test/test_smtplib.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -400,7 +400,8 @@ def testVRFY(self):
400400

401401
for email, name in sim_users.items():
402402
expected_known = (250, bytes('%s %s' %
403-
(name, smtplib.quoteaddr(email))))
403+
(name, smtplib.quoteaddr(email)),
404+
"ascii"))
404405
self.assertEqual(smtp.vrfy(email), expected_known)
405406

406407
@@ -416,7 +417,7 @@ def testEXPN(self):
416417
users = []
417418
for m in members:
418419
users.append('%s %s' % (sim_users[m], smtplib.quoteaddr(m)))
419-
expected_known = (250, bytes('\n'.join(users)))
420+
expected_known = (250, bytes('\n'.join(users), "ascii"))
420421
self.assertEqual(smtp.expn(listname), expected_known)
421422

422423
u = 'PSU-Members-List'

0 commit comments

Comments
 (0)