MCPcopy Create free account
hub / github.com/authlib/authlib / test_invalid_scope

Function test_invalid_scope

tests/flask/test_oauth2/test_refresh_token.py:111–123  ·  view source on GitHub ↗
(test_client, token)

Source from the content-addressed store, hash-verified

109
110
111def test_invalid_scope(test_client, token):
112 headers = create_basic_header("client-id", "client-secret")
113 rv = test_client.post(
114 "/oauth/token",
115 data={
116 "grant_type": "refresh_token",
117 "refresh_token": "r1",
118 "scope": "invalid",
119 },
120 headers=headers,
121 )
122 resp = json.loads(rv.data)
123 assert resp["error"] == "invalid_scope"
124
125
126def test_invalid_scope_none(test_client, token):

Callers

nothing calls this directly

Calls 2

create_basic_headerFunction · 0.85
postMethod · 0.80

Tested by

no test coverage detected