'Make sure an OpenID 2 request with no return_to can be
decoded, and make sure a response to such a request raises
NoReturnToError.'

def test_checkidSetupNoReturnOpenID2(self):

    args = {'openid.ns': OPENID2_NS, 'openid.mode': 'checkid_setup', 'openid.identity': self.id_url, 'openid.claimed_id': self.id_url, 'openid.assoc_handle': self.assoc_handle, 'openid.realm': self.tr_url}
    self.failUnless(isinstance(self.decode(args), server.CheckIDRequest))
    req = self.decode(args)
    self.assertRaises(server.NoReturnToError, req.answer, False)
    self.assertRaises(server.NoReturnToError, req.encodeToURL, 'bogus')
    self.assertRaises(server.NoReturnToError, req.getCancelURL)
