summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2010-10-31 17:59:20 (GMT)
committerBenjamin Peterson <benjamin@python.org>2010-10-31 17:59:20 (GMT)
commit959516615c3e302dcec0660788e8156ce397841a (patch)
tree4b3ded7b24b6ba55dae72eeee889e8fc60c85cc3
parent189316a2e35eede0de61c4713777c2b8e04c2e99 (diff)
downloadcpython-959516615c3e302dcec0660788e8156ce397841a.zip
cpython-959516615c3e302dcec0660788e8156ce397841a.tar.gz
cpython-959516615c3e302dcec0660788e8156ce397841a.tar.bz2
string exceptions; how quaint
-rw-r--r--Lib/test/test_smtplib.py6
1 files changed, 2 insertions, 4 deletions
diff --git a/Lib/test/test_smtplib.py b/Lib/test/test_smtplib.py
index 91a9d81..6390a86d 100644
--- a/Lib/test/test_smtplib.py
+++ b/Lib/test/test_smtplib.py
@@ -502,8 +502,7 @@ class SMTPSimTests(unittest.TestCase):
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 @@ class SMTPSimTests(unittest.TestCase):
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