def test_add_dynamic(get_headers_json): """ 发布动态(带图片/文件/任务) :param get_headers_json: :return: dynamicId """ url = read_url(1) json = read_data(1) headers = get_headers_json r = method.HttpRequest() res = r.run_method(url=url, method="POST", json=json, headers=headers) dynamicId=res.json()["resModel"] set_data_yaml("dynamicId",dynamicId) #动态id写入data.yaml文件 set_data_yaml("id",dynamicId) #动态id写入data.yaml文件
def test_add_dynamic_remark(get_headers_json): """ 动态评论 :param get_headers_json: :param dynamicId: :return: remarkId """ url = read_url(2) json = read_data(2) headers = get_headers_json r = method.HttpRequest() res = r.run_method(url=url, method="POST", json=json, headers=headers) remarkId=res.json()["resModel"]["id"] set_data_yaml("remarkId",remarkId) #评论id写入data.yaml文件
def test_add_task2(get_headers_json): """ 添加设计任务 :param get_headers_json: :return:taskId1 """ url = read_url(9) headers = get_headers_json json = read_data(18) r = method.HttpRequest() res = r.run_method(url=url, method="POST", json=json, headers=headers) taskId = res.json()["resModel"] set_data_yaml("taskId", taskId) # 任务id写入data.yaml文件 set_data_yaml("id", taskId) # 任务id写入data.yaml文件
def test_detail_task4(get_headers_json): """ 查看任务详情,返回任务检验节点id :param get_headers_json: :param taskId1: :return: processInstanceId """ url = read_url(11) headers = get_headers_json data = read_data(11) r = method.HttpRequest() res = r.run_method(url=url, method="get", data=data, headers=headers) actTaskId = res.json( )["resModel"]["activitiMap"]['currentTaskList'][0]['id'] set_data_yaml("actTaskId", actTaskId)