def get_login_data(): data = ReadYaml("bainian_data").read_yaml() arr = [] for i in data.values(): arr.append((i.get("username"), i.get("password"), i.get("expect"), i.get("expect_toast"), i.get("message"))) return arr
def get_data(method): if method == "get": return ReadYaml("depart_data.yml").read_yaml().get( "text_depart_get_all") elif method == "post": return ReadYaml("depart_data.yml").read_yaml().get("text_depart_add") elif method == "put": return ReadYaml("depart_data.yml").read_yaml().get("text_depart_all") elif method == "delete": return ReadYaml("depart_data.yml").read_yaml().get( "text_depart_add").get("data")[0].get("dep_id")
def get_data(data_type): add_address = [] edit_address = [] datas = ReadYaml("address_data").read_yaml() if data_type == "add": for data in datas.get("add_address").values(): add_address.append((data.get("name"), data.get("phone"), data.get("address"), data.get("post"))) return add_address elif data_type == "edit": for data in datas.get("edit_address").values(): edit_address.append( (data.get("name"), data.get("phone"), data.get("province"), data.get("city"), data.get("area"), data.get("detail_address"), data.get("expect_toast"))) return edit_address
def get_data(): datas = ReadYaml("search_data").read_yaml() arrs = [] for data in datas.values(): arrs.append(data.get("input_text")) return arrs