Skip to content

Instantly share code, notes, and snippets.

@mattias-lidman
Created May 30, 2014 19:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mattias-lidman/86b71bb444e0f1cd8b92 to your computer and use it in GitHub Desktop.
Save mattias-lidman/86b71bb444e0f1cd8b92 to your computer and use it in GitHub Desktop.
from globusonline.graph.policies.resources import PolicyOption
import uuid
def testfoo():
group = gm.create_group(name="Testing policy race condition", description="Delete me")
policy_options_factory = group._node.policy_options
for option_type in ['approval', 'group_member_visibility', 'group_visibility', 'join',
'invites', 'sign_up_fields', 'group_creation']:
opt_id = str(uuid.uuid4())
opt_node = request.data_store.create_node('policy_option', opt_id)
pot = request.data_store.get_node("policy_option_type",option_type)
policy_options_factory(opt_node)
getattr(opt_node, "rdf:type")(pot)
option_type_factory = getattr(opt_node, "rdf:type")
option_type = option_type_factory.outgoing.single.target_node
group.delete()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment