def test_create_album_A_token_w(): data = { "title": "album A token write only", "scope_type": "album", "album": env.env_var['ALBUM_ID_A'], "read_permission": False, "write_permission": True } new_token = rq_capability_token.create(token=env.env_var['USER_1_TOKEN'], data=data) env.env_var["TOKEN_W_ALBUM_A"] = new_token["secret"]
def test_create_capability_token(): data = { "title": "name", "scope_type": "album", "album": env.env_var.get("ALBUM_ID"), "read_permission": True, "appropriate_permission": True, "download_permission": False, "write_permission": False } capability_token = rq_capability_token.create( token=env.env_var.get("USER_1_TOKEN"), data=data) env.env_var["CAPABILITY_TOKEN"] = capability_token["secret"]
def test_create_karnak_token_r_w(): data = { "title": "karnak token read write", "scope_type": "album", "album": env.env_var['ALBUM_ID_KARNAK'], "read_permission": True, "appropriate_permission": True, "download_permission": False, "write_permission": True } new_token = rq_capability_token.create( token=env.env_var['USER_KARNAK_TOKEN'], data=data) env.env_var["TOKEN_RW_KARNAK"] = new_token["secret"]
def test_get_usertoken(): data = {"title":"karnak token read write", "scope_type":"user"} new_token = rq_capability_token.create(token=env.env_var['USER_1_TOKEN'], data=data) env.env_var["USER_TOKEN"]=new_token["secret"]