def twill_checkidv1(self, twillInfo):
        endpoint = self.v1endpoint(self.server_port)
        authreq = AuthRequest(endpoint, assoc=None)
        url = authreq.redirectURL(self.realm, self.return_to)

        c = twill.commands

        try:
            c.go(url)
            c.get_browser()._browser.set_handle_redirect(False)
            c.submit("yes")
            c.code(302)
            headers = c.get_browser()._browser.response().info()
            finalURL = headers['Location']
            self.failUnless('openid.mode=id_res' in finalURL, finalURL)
            self.failUnless('openid.identity=' in finalURL, finalURL)
        except twill.commands.TwillAssertionError, e:
            msg = '%s\nFinal page:\n%s' % (
                str(e), c.get_browser().get_html())
            self.fail(msg)
dataset/ETHPy150Open CollabQ/CollabQ/openid/test/test_examples.py/TestServer.twill_checkidv1/original