'Check that when an OpenID 2 response does not exceed the
OpenID 1 message size, a GET response (i.e., redirect) is
issued.'

def test_id_res_OpenID2_GET(self):

    request = server.CheckIDRequest(identity='http://bombom.unittest/', trust_root='http://burr.unittest/', return_to='http://burr.unittest/999', immediate=False, op_endpoint=self.server.op_endpoint)
    request.message = Message(OPENID2_NS)
    response = server.OpenIDResponse(request)
    response.fields = Message.fromOpenIDArgs({'ns': OPENID2_NS, 'mode': 'id_res', 'identity': request.identity, 'claimed_id': request.identity, 'return_to': request.return_to})
    self.failIf(response.renderAsForm())
    self.failUnless((response.whichEncoding() == server.ENCODE_URL))
    webresponse = self.encode(response)
    self.failUnless(webresponse.headers.has_key('location'))
