Created
May 30, 2014 19:10
-
-
Save mattias-lidman/86b71bb444e0f1cd8b92 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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