MCPcopy Index your code
hub / github.com/RustPython/RustPython / test_bad_auth_name

Method test_bad_auth_name

Lib/test/test_imaplib.py:417–425  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

415 client.search('foo', 'bar')
416
417 def test_bad_auth_name(self):
418 class MyServer(SimpleIMAPHandler):
419 def cmd_AUTHENTICATE(self, tag, args):
420 self._send_tagged(tag, 'NO',
421 'unrecognized authentication type {}'.format(args[0]))
422 client, _ = self._setup(MyServer)
423 with self.assertRaisesRegex(imaplib.IMAP4.error,
424 'unrecognized authentication type METHOD'):
425 client.authenticate('METHOD', lambda: 1)
426
427 def test_invalid_authentication(self):
428 class MyServer(SimpleIMAPHandler):

Callers

nothing calls this directly

Calls 3

_setupMethod · 0.95
assertRaisesRegexMethod · 0.80
authenticateMethod · 0.80

Tested by

no test coverage detected