Пример #1
0
def get_data():
    datas = ReadYaml('login.yaml').read_yaml()
    arrs = []
    for data in datas.values():
        arrs.append((data.get('username'), data.get('password'),
                     data.get('expect'), data.get('toast_expect')))
    return arrs
Пример #2
0
def get_data():
    datas = ReadYaml("login.yaml").read_yaml()
    arrs = []
    for data in datas.values():
        arrs.append((data.get("username"), data.get("password"),
                     data.get("expect"), data.get("toast_expect")))
    return arrs
Пример #3
0
 def get_data(self):
     datas = ReadYaml("login.yaml").read_yaml()
     print(datas)
     arrs = []
     for data in datas.values():
         print(data)
         arrs.append((data.get("username"), data.get("password"), data.get("expext"), data.get("toast_except")))
     return arrs
Пример #4
0
def get_data03():
    datas = ReadYaml('address.yaml').read_yaml()
    data = datas.get('add_address').values()
    arrs = []
    for data in datas.get('add_address').values():
        arrs.append((data.get("receipt_name"), data.get("add_phone"),
                     data.get("sheng"), data.get("shi"), data.get("qu"),
                     data.get("address"), data.get("postcode")))
    return arrs
Пример #5
0
def get_data(type):
    if type == "sms":
        # 实例化 读取解析yaml工具类
        arr = []
        datas = ReadYaml("test_sms.yml").read_yml()
        for data in datas.values():
            arr.append(data.get("input_text"))
        return arr
    elif type == "setting":
        # 实例化 读取解析yaml工具类
        return ReadYaml("test_setting.py").read_yml()
Пример #6
0
def get_data():
    # 定义空数字组
    arrs = []
    for data in ReadYaml("login.yaml").read_yaml().values():
        arrs.append((data.get("username"), data.get("password"),
                     data.get("expect_result"), data.get("expect_toast")))
    return arrs
Пример #7
0
def get_data(text_type):
    datas = ReadYaml("address.yaml").read_yaml()
    arrs = []
    if text_type == "add":
        for data in datas.get("add_address").values():
            arrs.append((data.get("receipt_name"), data.get("phone"),
                         data.get("sheng"), data.get("shi"), data.get("qu"),
                         data.get("address"), data.get("postcode")))
        return arrs
    elif text_type == "update":
        for data in datas.get("update_address").values():
            arrs.append((data.get("receipt_name"), data.get("phone"),
                         data.get("sheng"), data.get("shi"), data.get("qu"),
                         data.get("address"), data.get("postcode"),
                         data.get("toast_expect")))
        return arrs
Пример #8
0
def get_data():
    #     自定义空列表
    arrs = []
    # 获取出的结果为列表,列表内单个元素值为字典 data.values
    for data in ReadYaml("login_data.yml").read_yaml().values():
        arrs.append((data.get("username"), data.get("password"),
                     data.get("expect_result"), data.get("expect_toast")))
    return arrs
Пример #9
0
def get_data(data_type):
    arrs = []
    if data_type == "add":
        for data in ReadYaml("address.yaml").read_yaml().get(
                "add_address").values():
            arrs.append(
                (data.get("name"), data.get("phone"), data.get("sheng"),
                 data.get("shi"), data.get("qu"), data.get("info_address"),
                 data.get("code")))
        return arrs
    elif data_type == "update":
        for data in ReadYaml("address.yaml").read_yaml().get(
                "update_address").values():
            arrs.append(
                (data.get("name"), data.get("phone"), data.get("sheng"),
                 data.get("shi"), data.get("qu"), data.get("info_address"),
                 data.get("code")))
        return arrs
Пример #10
0
def get_data(data_type):
    #     return [("Leon","18600001111","山西省","临汾市","尧都区","贡院西街1号","041004")]
    #     return [("Leon","18600001111","北京市","北京市","朝阳区","XXXXXX号","010001")]
    arrs = []
    if data_type == "add":
        for data in ReadYaml("address.yaml").read_yaml().get(
                "add_address").values():
            arrs.append(
                (data.get("name"), data.get("phone"), data.get("sheng"),
                 data.get("shi"), data.get("qu"), data.get("info_address"),
                 data.get("code")))
        return arrs
    elif data_type == "updata":
        for data in ReadYaml("address.yaml").read_yaml().get(
                "updata_address").values():
            arrs.append(
                (data.get("name"), data.get("phone"), data.get("sheng"),
                 data.get("shi"), data.get("qu"), data.get("info_address"),
                 data.get("code")))
        return arrs