代码拉取完成,页面将自动刷新
# from database import db
# from excel import ExcelLoginData
from openpyxl import load_workbook
import yaml
import pytest
import pymysql
class data():
@staticmethod
def list(): #登录测试
# list1 = [['lisi3', '123!@#$%^%&456'],
# ['lisi', '123456']]
list1 = [['lisi7', '123456'], ['lisi', '123456'], ['lisi3', '123!@#$%^%&456'],
['lisi3', '123456'], ['lisi', '1234567'], ['admin', '123456']]
return list1
#注册
@staticmethod
def list2(): #注册测试
list2 = [ ["zhaoliu3", "123456", "123456"],
["sun3", "123456", "123456"],
["lijing3", "123456","123456"]
]
return list2
@staticmethod
def list_3(): #银行卡测试
list3 = [ ["富贵花开", "1234567891234565"],
["无语", "9999999999997999"],
]
return list3
@staticmethod #excel表读取数据
def read_login_data(file_name, sheet_name):
wb = load_workbook(
filename=file_name)
st = wb[sheet_name]
data = [[st.cell(row=i, column=j).value for j in range(1, 4)] for i in range(2, st.max_row + 1)]
return data
@staticmethod #yaml读取数据
def read_yaml(file_name):
file = open(file=file_name,mode='rb')
data1 = yaml.load(file, Loader=yaml.SafeLoader)
print(data1)
return data1
# data().read_yaml('data1.yaml')
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。