def bg_role(role_dict, bg_nested_role): dict_copy = copy.deepcopy(role_dict) dict_copy['roles'] = [bg_nested_role] return Role(**dict_copy)
def role(self): return Role(name="bg-admin", roles=["bg-anonymous"], permissions=["bg-all"])
def bg_nested_role(nested_role_dict): return Role(**nested_role_dict)
def role(self): return Role(name='bg-admin', roles=['bg-anonymous'], permissions=['bg-all'])