from .testable_imapclient import TestableIMAPClient as IMAPClient
from .imapclient_test import IMAPClientTest
+
class TestListFolders(IMAPClientTest):
def test_list_folders(self):
(("#shared/", "/"), ("#public/", "/"), ("#ftp/", "/"), ("#news.", ".")),
))
+
class TestCapabilities(IMAPClientTest):
def test_preauth(self):
self.assertTrue(self.client.has_capability('foo'))
self.assertFalse(self.client.has_capability('BAR'))
+
class TestThread(IMAPClientTest):
def test_thread_without_uid(self):
self.client._imap.thread.assert_called_once_with(b'FOO', b'ASCII', '(STUFF)')
+
class TestId(IMAPClientTest):
def test_id(self):
id_response = self.client.id_({'name': 'IMAPClient'})
self.client._imap._simple_command.assert_called_with(
- 'ID', u'("name" "IMAPClient")')
+ 'ID', '("name" "IMAPClient")')
- assert id_response == (('name', 'GImap', 'vendor', 'Google, Inc.'),)
+ self.assertSequenceEqual(
+ id_response,
+ ((b'name', b'GImap', b'vendor', b'Google, Inc.'),))
def test_no_support(self):
self.client._cached_capabilities = (b'IMAP4rev1',)