summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_imaplib.py
diff options
context:
space:
mode:
authorNick Coghlan <ncoghlan@gmail.com>2012-06-17 11:15:45 (GMT)
committerNick Coghlan <ncoghlan@gmail.com>2012-06-17 11:15:45 (GMT)
commite51e25a3bc6e4e8396ebf63c78f269fabae0f0d0 (patch)
tree293b40ad0bcae9f449b746f129a141aad5ec3445 /Lib/test/test_imaplib.py
parent9aff2a7c41ac28f6c3f65933d9b1c1ff6ce4fe40 (diff)
parente6ef4622431d8a79d4dbe1313137e443d4dc7db5 (diff)
downloadcpython-e51e25a3bc6e4e8396ebf63c78f269fabae0f0d0.zip
cpython-e51e25a3bc6e4e8396ebf63c78f269fabae0f0d0.tar.gz
cpython-e51e25a3bc6e4e8396ebf63c78f269fabae0f0d0.tar.bz2
Merge from 3.2 (Issue #15095: Use better assertions in test_imaplib)
Diffstat (limited to 'Lib/test/test_imaplib.py')
-rw-r--r--Lib/test/test_imaplib.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/Lib/test/test_imaplib.py b/Lib/test/test_imaplib.py
index 50b2da1..e629cb1 100644
--- a/Lib/test/test_imaplib.py
+++ b/Lib/test/test_imaplib.py
@@ -233,8 +233,8 @@ class RemoteIMAPTest(unittest.TestCase):
with transient_internet(self.host):
for cap in self.server.capabilities:
self.assertIsInstance(cap, str)
- self.assertTrue('LOGINDISABLED' in self.server.capabilities)
- self.assertTrue('AUTH=ANONYMOUS' in self.server.capabilities)
+ self.assertIn('LOGINDISABLED', self.server.capabilities)
+ self.assertIn('AUTH=ANONYMOUS', self.server.capabilities)
rs = self.server.login(self.username, self.password)
self.assertEqual(rs[0], 'OK')
@@ -257,7 +257,7 @@ class RemoteIMAP_STARTTLSTest(RemoteIMAPTest):
def test_logincapa(self):
for cap in self.server.capabilities:
self.assertIsInstance(cap, str)
- self.assertFalse('LOGINDISABLED' in self.server.capabilities)
+ self.assertNotIn('LOGINDISABLED', self.server.capabilities)
@unittest.skipUnless(ssl, "SSL not available")
@@ -280,8 +280,8 @@ class RemoteIMAP_SSLTest(RemoteIMAPTest):
try:
for cap in server.capabilities:
self.assertIsInstance(cap, str)
- self.assertFalse('LOGINDISABLED' in server.capabilities)
- self.assertTrue('AUTH=PLAIN' in server.capabilities)
+ self.assertNotIn('LOGINDISABLED', server.capabilities)
+ self.assertIn('AUTH=PLAIN', server.capabilities)
rs = server.login(self.username, self.password)
self.assertEqual(rs[0], 'OK')
finally: