コード例 #1
0
 def validate_scope(self, client_id, scopes_string):
     return scopes.validate_scope_string(scopes_string)
コード例 #2
0
def test_parsing(scopes_string, expected):
    expected_scope_set = {ALL_SCOPES[scope_name] for scope_name in expected}
    parsed_scope_set = scopes_from_scope_string(scopes_string)
    assert parsed_scope_set == expected_scope_set
    assert validate_scope_string(scopes_string) == bool(expected)