def test_requestAvatarId(self):
        """
        L{SSHProtocolChecker.requestAvatarId} should defer to one if its
        registered checkers to authenticate a user.
        """
        checker = checkers.SSHProtocolChecker()
        passwordDatabase = InMemoryUsernamePasswordDatabaseDontUse()
        passwordDatabase.addUser(b'test', b'test')
        checker.registerChecker(passwordDatabase)
        d = checker.requestAvatarId(UsernamePassword(b'test', b'test'))
        def _callback(avatarId):
            self.assertEqual(avatarId, b'test')
        return d.addCallback(_callback)

        L{SSHProtocolChecker.requestAvatarId} should defer to one if its
        registered checkers to authenticate a user.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/conch/test/test_checkers.py