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

Method test_bad_auth_name

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

Source from the content-addressed store, hash-verified

934
935 @threading_helper.reap_threads
936 def test_bad_auth_name(self):
937
938 class MyServer(SimpleIMAPHandler):
939
940 def cmd_AUTHENTICATE(self, tag, args):
941 self._send_tagged(tag, 'NO', 'unrecognized authentication '
942 'type {}'.format(args[0]))
943
944 with self.reaped_pair(MyServer) as (server, client):
945 with self.assertRaises(imaplib.IMAP4.error):
946 client.authenticate('METHOD', lambda: 1)
947
948 @threading_helper.reap_threads
949 def test_invalid_authentication(self):

Callers

nothing calls this directly

Calls 3

reaped_pairMethod · 0.95
authenticateMethod · 0.80
assertRaisesMethod · 0.45

Tested by

no test coverage detected