'Check that when an OpenID 1 response exceeds the OpenID 1
message size, a GET response is issued.  Technically, this
shouldn\'t be permitted by the library, but this test is in
place to preserve the status quo for OpenID 1.'

def test_id_res_OpenID1_exceeds_limit(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({'mode': 'id_res', 'identity': request.identity, 'return_to': ('x' * OPENID1_URL_LIMIT)})
    self.failIf(response.renderAsForm())
    self.failUnless((len(response.encodeToURL()) > OPENID1_URL_LIMIT))
    self.failUnless((response.whichEncoding() == server.ENCODE_URL))
    webresponse = self.encode(response)
    self.failUnlessEqual(webresponse.headers['location'], response.encodeToURL())
