Example #1
0
def get_data():
    data = ReadJson('channels.json').read_json()
    arrs = []
    arrs.append(
        (data.get('url'), data.get('headers'), data.get('expect_result'),
         data.get('status_code')))
    return arrs
Example #2
0
def get_data():
    data = ReadJson("channel.json").read_json()
    arrs = []
    arrs.append(
        (data.get("url"), data.get("headers"), data.get("expect_result"),
         data.get("status_code")))
    return arrs
def get_data():
    data = ReadJson("login.json").read_json()
    # 新建空列表,添加读取json数据
    arrs = []
    arrs.append((data.get("jumpurl"), data.get("step"), data.get("pwuser"),
                 data.get("pwpwd"), data.get("lgt")))
    return arrs
Example #4
0
def get_data():
    data = ReadJson("login.json").read_json()
    arr = []
    arr.append((data.get("url"), data.get("mobile"), data.get("code"),
                data.get("expect_resule"), data.get("status_code")))
    # print(arr)
    return arr
Example #5
0
def get_data():
    data = ReadJson("login.json").read_json()
    #新建空列表,存放读取json数据
    arrs = []
    arrs.append((data.get('url'), data.get('name'), data.get('password'),
                 data.get('expect_result')))
    return arrs
Example #6
0
def get_data():
    data = ReadJson("login.json").read_json()
    # 新建空列表,添加读取json数据
    arrs = []
    arrs.append((data.get("url"), data.get("mobile"), data.get("code"),
                 data.get("expect_result"), data.get("status_code")))
    return arrs
Example #7
0
def get_data():
    data = ReadJson("obtain.json").read_json()
    list1 = []
    list1.append((data.get("url"),
                  data.get("token"),
                  data.get("status_code")))
    return list1
Example #8
0
def get_data():
    data = ReadJson('login.json').read_json()
    print(type(data))
    #新建一个空列表读取json数据
    arrs = []
    arrs.append((data.get('url'), data.get('username'), data.get('password'),
                 data.get('Submit')))
    return arrs
def get_data_cancel():
    data = ReadJson("article_cancel.json").read_json()
    # 新建空列表,添加读取json数据
    arrs = []
    arrs.append((data.get("url"),
                 data.get("headers"),
                 data.get("status_code")))
    return arrs
Example #10
0
def get_data_cancle():
    data = ReadJson("article_cancle.json").read_json()
    arrs = []
    arrs.append((data.get("url"),
                 data.get("headers"),
                 data.get("status_code")
                 ))
    return (arrs)
def get_data_add():
    data = ReadJson("article_add.json").read_json()
    # 新建空列表,添加读取json数据
    # print("shuju", data)
    arrs = []
    arrs.append((data.get("url"), data.get("headers"), data.get("data"),
                 data.get("expect_result"), data.get("status_code")))
    return arrs
Example #12
0
def get_data_cancel():
    data = ReadJson("article_cancel.json").read_json()
    # print(data)
    arrs = []
    arrs.append(
        (data.get("url"), data.get("headers"), data.get("status_code")))
    # print(arrs)
    return arrs
Example #13
0
def get_data():
    data = ReadJson("login.json").read_json()
    # data是字典格式,粗腰创建空列表存储数据
    arrs = []
    arrs.append((data.get("url"), data.get("mobile"), data.get("code"),
                 data.get("expect_result"), data.get("status_code")))
    # print(arrs)
    return arrs
Example #14
0
def get_data_create():
    data=ReadJson("create.json").read_json()
    #新建空列表,添加读取json数据
    arrs=[]
    arrs.append((data.get("url"),
                data.get('headers'),
                data.get('expect_result'),
                data.get('data')))
    return arrs
Example #15
0
def get_data_cancel():
    data = ReadJson("article_cancel.json").read_json()
    arrs = []
    # append本身添加的就是[],而我们需要的是[()],所以里面要加上(),否则就把所有内容都添加到一个列表里了
    arrs.append((
        data.get("url"),  # data["url"]和get方式的区别是前者如果获取错误会报异常,后者则为空
        data.get("headers"),
        data.get("status_code")))
    return arrs
Example #16
0
def get_data_cancel():
    data = ReadJson("article_cancel.json").read_json()
    arrs = []
    arrs.append((
        data.get('url'),
        data.get('headers'),
        data.get('status_code')
    ))
    return arrs
Example #17
0
def get_qx_data():
    data = ReadJson("collect_more1.json").read_json()
    airs = [(data.get("path"),
             data.get("data"),
             data.get("msg"),
             data.get("status_code")
             )]
    # 使用遍历获取所有value
    return airs
Example #18
0
def get_data():
    data = ReadJson("channel.json").read_json()
    arr = []
    # 采用data.get,如果取不到值会报错
    arr.append((data.get("url"),
                data.get("headers"),
                data.get("expect_resule"),
                data.get("status_code")
                ))
    return arr
Example #19
0
def get_data():
    data = ReadJson().read_json("addCon.json")
    # 新建空列表,添加读取json数据
    arrs = []
    arrs.append((data.get("url"),
                 data.get("name"),
                 data.get("value"),
                 data.get("expect_result"),
                 data.get("status_code")))
    return arrs
Example #20
0
def get_data():
    data =ReadJson("login.json").read_json()
    #新建空列表,添加读取json数据
    arrs=[]
    arrs.append((data.get("url"),
                data.get("name"),
                data.get("password"),
                data.get("expect_result")
                 ))
    return arrs
Example #21
0
def get_data():
    datas = ReadJson("login_more.json").read_json()
    # print(datas)
    arrs = []
    #使用遍历获取所有的value
    for datas in datas.values():
        arrs.append((datas.get("url"), datas.get("mobile"), datas.get("code"),
                     datas.get("expect_result"), datas.get("status_code")))
    # print(arrs)
    return arrs
Example #22
0
def data():
    # 更新活动信息
    data = ReadJson("coupon.json").read_json()
    # 新建空列表,添加读取json数据
    arrs = []
    arrs.append((data.get("url"),
                 data.get("headers"),
                 data.get("data"),
                 data.get("expect_result"),
                 data.get("status_code")))
    return arrs
Example #23
0
def get_data():#处理返回的json中字典内容,达到我们要求的[()]格式
    data = ReadJson("login.json").read_json()
    arrs = []
    # append本身添加的就是[],而我们需要的是[()],所以里面要加上(),否则就把所有内容都添加到一个列表里了
    arrs.append((data.get("url"),  # data["url"]和get方式的区别是前者如果获取错误会报异常,后者则为空
                 data.get("mobile"),
                 data.get("code"),
                 data.get("except_result"),
                 data.get("status_code")
                 ))
    return arrs
Example #24
0
def get_data_add():
    data = ReadJson("article_add.json").read_json()
    arrs = []
    arrs.append((
        data.get('url'),
        data.get('headers'),
        data.get('data'),
        data.get('expect_result'),
        data.get('status_code')
    ))
    return arrs
Example #25
0
def get_data():
    data = ReadJson("create.json").read_json()
    list1 = []
    list1.append((data.get("url"), data.get("city"), data.get("lable")))
    return list1
Example #26
0
def get_data():
    data = ReadJson("delete.json").read_json()
    list1 = []
    list1.append((data.get("url"), data.get("number"), data.get("errcode")))
    return list1