Exemplo n.º 1
0
def test_submitDesignVerify(get_headers_json):
    """
    设计任务提交审核
    :param get_headers_json:
    :return:
    """
    url = read_url(16)
    headers = get_headers_json
    json = read_data(21)
    r = method.HttpRequest()
    r.run_method(url=url, method="POST", json=json, headers=headers)
Exemplo n.º 2
0
def test_addRemarkResponse(get_headers_json):
    """
    回复评论
    :param get_headers_json:
    :return:
    """
    url = read_url(3)
    json = read_data(3)
    headers = get_headers_json
    r = method.HttpRequest()
    r.run_method(url=url, method="POST", json=json, headers=headers)
Exemplo n.º 3
0
def test_addLaud(get_headers):
    """
    动态点赞
    :param get_headers:
    :return:
    """
    url = read_url(4)
    headers = get_headers
    data= read_data(4)
    r = method.HttpRequest()
    r.run_method(url=url, method="POST", data=data, headers=headers)
Exemplo n.º 4
0
def test_updateEnableSignFlag(get_headers_from):
    """
    取消签章功能
    :param get_headers:
    :return:
    """
    url = read_url(18)
    headers = get_headers_from
    data = read_data(15)
    r = method.HttpRequest()
    r.run_method(url=url, method="POST", data=data, headers=headers)
Exemplo n.º 5
0
def test_taskDeliverables_add(get_headers_json):
    """
    提交设计成果
    :param get_headers_json:
    :param taskId2:
    :return:
    """
    url = read_url(15)
    headers = get_headers_json
    json = read_data(20)
    r = method.HttpRequest()
    r.run_method(url=url, method="POST", json=json, headers=headers)
Exemplo n.º 6
0
def test_startDesignTask(get_headers_json):
    """
    开始设计任务
    :param get_headers_json:
    :param taskId2:
    :return:
    """
    url = read_url(14)
    headers = get_headers_json
    json = read_data(19)
    r = method.HttpRequest()
    r.run_method(url=url, method="POST", json=json, headers=headers)
Exemplo n.º 7
0
def test_deleteLaud(get_headers_json):
    """
    动态取消点赞
    :param get_headers_json:
    :param dynamicId
    :return:
    """
    url = read_url(5)
    params = read_data(4)
    headers = get_headers_json
    r = method.HttpRequest()
    r.run_method(url=url, method="del",headers=headers,params=params)
Exemplo n.º 8
0
def test_dynamic_detail(get_headers_json):
    """
    查询动态详情
    :param get_headers_json:
    :param dynamicId:
    :return:
    """
    url = read_url(6)
    headers = get_headers_json
    data = read_data(7)
    r = method.HttpRequest()
    r.run_method(url=url, method="get", data=data, headers=headers)
Exemplo n.º 9
0
def test_finish_task(get_headers_json):
    """
    通过发布动态关联任务,100%触发完成任务
    :param get_headers_json:
    :return:
    """
    url = read_url(1)
    headers = get_headers_json
    json = read_data(10)
    r = method.HttpRequest()
    res = r.run_method(url=url, method="POST", json=json, headers=headers)
    print(res.text)
Exemplo n.º 10
0
def test_start_task(get_headers_json):
    """
    开始任务
    :param get_headers_json:
    :return:
    """
    url = read_url(12)
    headers = get_headers_json
    json = read_data(9)
    r = method.HttpRequest()
    res = r.run_method(url=url, method="POST", json=json, headers=headers)
    print(res.text)
Exemplo n.º 11
0
def test_del_dynamic(get_headers_json):
    """
    删除动态
    :param get_headers_json:
    :param dynamicId:
    :return:
    """
    url = read_url(8)
    params = read_data(6)
    headers = get_headers_json
    r = method.HttpRequest()
    r.run_method(url=url, method="del",headers=headers,params=params)
Exemplo n.º 12
0
def test_login():
    '''
    登陆
    :return:
    '''
    set_headers_yaml("openId", openId())  #初始化登陆信息
    set_headers_yaml("projectId", projectId())  #初始化项目ID信息
    url = read_url(0)
    headers = {"Accept": "*/*", "appId": appId()}
    data = read_data(0)
    r = method.HttpRequest()
    res = r.run_method(url=url, method="POST", data=data, headers=headers)
    return res.json()["resModel"]["token"]
Exemplo n.º 13
0
def test_submitVerify_task(get_headers_json):
    """
    任务提交检验
    :param get_headers_json:
    :param taskId1:
    :param processInstanceId:
    :return:
    """
    url = read_url(10)
    headers = get_headers_json
    json = read_data(12)
    r = method.HttpRequest()
    r.run_method(url=url, method="POST", json=json, headers=headers)
Exemplo n.º 14
0
def test_del_dynamic_remark(get_headers_json):
    """
    删除评论
    :param get_headers_json:
    :param dynamicId:
    :param remarkId:
    :return:
    """
    url =read_url(7)
    params = read_data(5)
    headers = get_headers_json
    r = method.HttpRequest()
    r.run_method(url=url, method="del",headers=headers,params=params)
Exemplo n.º 15
0
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文件
Exemplo n.º 16
0
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文件
Exemplo n.º 17
0
def test_verify(get_headers_json):
    """
    非签章任务点击合格
    :param get_headers:
    :return:
    """
    url = read_url(19)
    headers = get_headers_json
    data = read_data(16)
    r = method.HttpRequest()
    r.run_method(url=url,
                 method="POST",
                 data=json.dumps(data),
                 headers=headers)
Exemplo n.º 18
0
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文件
Exemplo n.º 19
0
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)
Exemplo n.º 20
0
def test_designVerify(get_headers_json):
    url = read_url(17)
    headers = get_headers_json
    json = read_data(22)
    r = method.HttpRequest()
    r.run_method(url=url, method="POST", json=json, headers=headers)
Exemplo n.º 21
0
import requests
from Common import method
import json
from Params import rw_yml
url = method.get_url(rw_yml.read_url(1, 'url'))
json1 = rw_yml.read_data(1, 'data')
# json1={
#     "projectId":"537712031151685632",
#     "type":0,
#     "subTypeName":"",
#     "taskId":"715290265899762513",
#     "taskProgress":0,
#     "address":"深圳市福田区人民政府附近",
#     "nearBy":"深圳市福田区福民路214号",
#     "city":"深圳市",
#     "content":"测试发布一个自动化动态",
#     "originalContent":"测试发布一个自动化动态",
#     "country":"中国",
#     "county":"福田区",
#     "imgs":[
#         {
#             "compressImgPath":"https://xcxprd.tgct.com.cn/api/fileservice/file/dynamic/download/718186494132486158",
#             "imgPath":"https://xcxprd.tgct.com.cn/api/fileservice/file/dynamic/download/718178414225260617",
#             "compressImgId":"718186494132486158",
#             "id":"718178414225260617"
#         },
#         {
#             "compressImgPath":"https://xcxprd.tgct.com.cn/api/fileservice/file/dynamic/download/718186494132486159",
#             "imgPath":"https://xcxprd.tgct.com.cn/api/fileservice/file/dynamic/download/718178414225260618",
#             "compressImgId":"718186494132486159",
#             "id":"718178414225260618"