def test_client_parse_args(): cli = Client() args = { "response_type": "", "client_id": "client_id", "redirect_uri": "http://example.com/authz", "scope": "scope", "state": "state", } ar_args = cli._parse_args(AuthorizationRequest, **args) print ar_args.keys() assert _eq(ar_args.keys(), ["scope", "state", "redirect_uri", "response_type", "client_id"])
def test_client_parse_args(): cli = Client() args = { "response_type": "", "client_id": "client_id", "redirect_uri": "http://example.com/authz", "scope": "scope", "state": "state", } ar_args = cli._parse_args(AuthorizationRequest, **args) print ar_args.keys() assert _eq(ar_args.keys(), ['scope', 'state', 'redirect_uri', 'response_type', 'client_id'])
def test_client_parse_extra_args(): cli = Client() args = { "response_type": "", "client_id": "client_id", "redirect_uri": "http://example.com/authz", "scope": "scope", "state": "state", "extra_session": "home" } ar_args = cli._parse_args(AuthorizationRequest, **args) print ar_args.keys() assert _eq(ar_args.keys(), ['state', 'redirect_uri', 'response_type', 'client_id', 'scope', 'extra_session'])