(self)
| 424 | client.authenticate('METHOD', lambda: 1) |
| 425 | |
| 426 | def test_invalid_authentication(self): |
| 427 | class MyServer(SimpleIMAPHandler): |
| 428 | def cmd_AUTHENTICATE(self, tag, args): |
| 429 | self._send_textline('+') |
| 430 | self.response = yield |
| 431 | self._send_tagged(tag, 'NO', '[AUTHENTICATIONFAILED] invalid') |
| 432 | client, _ = self._setup(MyServer) |
| 433 | with self.assertRaisesRegex(imaplib.IMAP4.error, |
| 434 | r'\[AUTHENTICATIONFAILED\] invalid'): |
| 435 | client.authenticate('MYAUTH', lambda x: b'fake') |
| 436 | |
| 437 | def test_valid_authentication_bytes(self): |
| 438 | class MyServer(SimpleIMAPHandler): |
nothing calls this directly
no test coverage detected