MCPcopy Index your code
hub / github.com/python/cpython / test_bad_auth_name

Method test_bad_auth_name

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

Source from the content-addressed store, hash-verified

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