mirror of
https://github.com/python/cpython.git
synced 2025-10-14 02:43:49 +00:00
Issue #10429: IMAP.starttls() stored the capabilities as bytes objects,
rather than strings.
This commit is contained in:
parent
36c0dbc9be
commit
dbe7519da9
3 changed files with 20 additions and 11 deletions
|
@ -208,6 +208,8 @@ class RemoteIMAPTest(unittest.TestCase):
|
|||
self.server.logout()
|
||||
|
||||
def test_logincapa(self):
|
||||
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)
|
||||
rs = self.server.login(self.username, self.password)
|
||||
|
@ -228,6 +230,8 @@ class RemoteIMAP_STARTTLSTest(RemoteIMAPTest):
|
|||
self.assertEqual(rs[0], 'OK')
|
||||
|
||||
def test_logincapa(self):
|
||||
for cap in self.server.capabilities:
|
||||
self.assertIsInstance(cap, str)
|
||||
self.assertFalse('LOGINDISABLED' in self.server.capabilities)
|
||||
|
||||
|
||||
|
@ -237,6 +241,8 @@ class RemoteIMAP_SSLTest(RemoteIMAPTest):
|
|||
imap_class = IMAP4_SSL
|
||||
|
||||
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)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue