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

Function test_scope_operator

tests/flask/test_oauth2/test_oauth2_server.py:156–164  ·  view source on GitHub ↗
(test_client, token)

Source from the content-addressed store, hash-verified

154
155
156def test_scope_operator(test_client, token):
157 headers = create_bearer_header("a1")
158 rv = test_client.get("/operator-and", headers=headers)
159 assert rv.status_code == 403
160 resp = json.loads(rv.data)
161 assert resp["error"] == "insufficient_scope"
162
163 rv = test_client.get("/operator-or", headers=headers)
164 assert rv.status_code == 200
165
166
167def test_optional_token(test_client, token):

Callers

nothing calls this directly

Calls 2

create_bearer_headerFunction · 0.85
getMethod · 0.45

Tested by

no test coverage detected