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

Method test_valid_authentication_bytes

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

Source from the content-addressed store, hash-verified

435 client.authenticate('MYAUTH', lambda x: b'fake')
436
437 def test_valid_authentication_bytes(self):
438 class MyServer(SimpleIMAPHandler):
439 def cmd_AUTHENTICATE(self, tag, args):
440 self._send_textline('+')
441 self.server.response = yield
442 self._send_tagged(tag, 'OK', 'FAKEAUTH successful')
443 client, server = self._setup(MyServer)
444 code, _ = client.authenticate('MYAUTH', lambda x: b'fake')
445 self.assertEqual(code, 'OK')
446 self.assertEqual(server.response, b'ZmFrZQ==\r\n') # b64 encoded 'fake'
447
448 def test_valid_authentication_plain_text(self):
449 class MyServer(SimpleIMAPHandler):

Callers

nothing calls this directly

Calls 3

_setupMethod · 0.95
authenticateMethod · 0.80
assertEqualMethod · 0.45

Tested by

no test coverage detected