def test_no_publickey(self):
        """
        If there's no public key, auth_publickey should return a Deferred
        called back with a False value.
        """
        self.authClient.getPublicKey = lambda x: None
        d = self.authClient.tryAuth(b'publickey')
        def check(result):
            self.assertFalse(result)
        return d.addCallback(check)

        If there's no public key, auth_publickey should return a Deferred
        called back with a False value.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/conch/test/test_userauth.py