[Python-checkins] r86050 - python/branches/py3k/Lib/test/test_smtplib.py
benjamin.peterson
python-checkins at python.org
Sun Oct 31 18:59:20 CET 2010
Author: benjamin.peterson
Date: Sun Oct 31 18:59:20 2010
New Revision: 86050
Log:
string exceptions; how quiant
Modified:
python/branches/py3k/Lib/test/test_smtplib.py
Modified: python/branches/py3k/Lib/test/test_smtplib.py
==============================================================================
--- python/branches/py3k/Lib/test/test_smtplib.py (original)
+++ python/branches/py3k/Lib/test/test_smtplib.py Sun Oct 31 18:59:20 2010
@@ -502,8 +502,7 @@
smtp = smtplib.SMTP(HOST, self.port, local_hostname='localhost', timeout=15)
try: smtp.login(sim_auth[0], sim_auth[1])
except smtplib.SMTPAuthenticationError as err:
- if sim_auth_login_password not in str(err):
- raise "expected encoded password not found in error message"
+ self.assertIn(sim_auth_login_password, str(err))
smtp.close()
def testAUTH_CRAM_MD5(self):
@@ -512,8 +511,7 @@
try: smtp.login(sim_auth[0], sim_auth[1])
except smtplib.SMTPAuthenticationError as err:
- if sim_auth_credentials['cram-md5'] not in str(err):
- raise "expected encoded credentials not found in error message"
+ self.assertIn(sim_auth_credentials['cram-md5'], str(err))
smtp.close()
#TODO: add tests for correct AUTH method fallback now that the
More information about the Python-checkins
mailing list