aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Coghlan <ncoghlan@gmail.com>2012-06-17 21:10:21 +1000
committerNick Coghlan <ncoghlan@gmail.com>2012-06-17 21:10:21 +1000
commite6ef4622431d8a79d4dbe1313137e443d4dc7db5 (patch)
tree56e74b6c75207c1dba269593cdf878aca40d817b /Lib/test/test_imaplib.py
parentIssue #15043: skip test_gdb if the custom hooks can't be loaded (diff)
downloadcpython-e6ef4622431d8a79d4dbe1313137e443d4dc7db5.tar.gz
cpython-e6ef4622431d8a79d4dbe1313137e443d4dc7db5.tar.bz2
cpython-e6ef4622431d8a79d4dbe1313137e443d4dc7db5.zip
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 7e9329cc4cc..5c99a58570e 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")
@@ -268,8 +268,8 @@ class RemoteIMAP_SSLTest(RemoteIMAPTest):
def test_logincapa(self):
for cap in self.server.capabilities:
self.assertIsInstance(cap, str)
- self.assertFalse('LOGINDISABLED' in self.server.capabilities)
- self.assertTrue('AUTH=PLAIN' in self.server.capabilities)
+ self.assertNotIn('LOGINDISABLED', self.server.capabilities)
+ self.assertIn('AUTH=PLAIN', self.server.capabilities)
def test_main():