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_login(self):
imap_client = aioimaplib.IMAP4(port=12345, loop=self.loop, timeout=3)
yield from asyncio.wait_for(imap_client.wait_hello_from_server(), 2)
result, data = yield from imap_client.login('user', 'password')
self.assertEquals(aioimaplib.AUTH, imap_client.protocol.state)
self.assertEqual('OK', result)
self.assertEqual('LOGIN completed', data[-1])