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_logout(self):
imap_client = yield from self.login_user('user', 'pass')
result, data = yield from imap_client.logout()
self.assertEqual('OK', result)
self.assertEqual(['BYE Logging out', 'LOGOUT completed'], data)
self.assertEquals(aioimaplib.LOGOUT, imap_client.protocol.state)