Esempio n. 1
0
def test_authz_endpoint():
    server = provider_init

    cli = Client()
    cli.redirect_uri = "http://www.example.org/authz"
    cli.client_id = "client0"
    cli.state = "_state_"
    args = {"response_type": ["code", "token"], "scope":["openid"]}
    req = cli.construct_AuthorizationRequest(request_args=args)

    environ = BASE_ENVIRON.copy()
    environ["QUERY_STRING"] = req.to_urlencoded()

    resp = server.authorization_endpoint(environ, start_response)
    print resp
    assert resp[0].startswith('<form>')
    assert resp[0].endswith('</form>')