def validate_scope(self, client_id, scopes_string): return scopes.validate_scope_string(scopes_string)
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)