Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def test_capabilities(self):
imap_client = aioimaplib.IMAP4(port=12345, loop=self.loop)
yield from asyncio.wait_for(imap_client.wait_hello_from_server(), 2)
self.assertEquals('IMAP4REV1', imap_client.protocol.imap_version)
self.assertEquals(['IMAP4rev1', 'LITERAL+', 'IDLE'], imap_client.protocol.capabilities)
def login_user(self, login, password, select=False, lib=aioimaplib.IMAP4):
imap_client = aioimaplib.IMAP4(port=12345, loop=self.loop, timeout=3)
yield from asyncio.wait_for(imap_client.wait_hello_from_server(), 2)
yield from imap_client.login('user', 'password')
if select:
yield from imap_client.select()
return imap_client
def login_user(self, login, password, select=False, lib=aioimaplib.IMAP4):
imap_client = aioimaplib.IMAP4(port=12345, loop=self.loop, timeout=3)
yield from asyncio.wait_for(imap_client.wait_hello_from_server(), 2)
yield from imap_client.login('user', 'password')
if select:
yield from imap_client.select()
return imap_client