def test_id_res_OpenID2_POST(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,
            )
        response = server.OpenIDResponse(request)
        response.fields = Message.fromOpenIDArgs({
            'ns': OPENID2_NS,
            'mode': 'id_res',
            'identity': request.identity,
            'claimed_id': request.identity,
            'return_to': 'x' * OPENID1_URL_LIMIT,
            })

        self.failUnless(response.renderAsForm())
        self.failUnless(len(response.encodeToURL()) > OPENID1_URL_LIMIT)
        self.failUnless(response.whichEncoding() == server.ENCODE_HTML_FORM)
        webresponse = self.encode(response)
        self.failUnlessEqual(webresponse.body, response.toFormMarkup())
Check that when an OpenID 2 response exceeds the OpenID 1
dataset/ETHPy150Open CollabQ/CollabQ/openid/test/test_server.py/TestEncode.test_id_res_OpenID2_POST