Exemple #1
0
class Test_login():
    def __init__(self):
        self.com =Common()
    def test_login(self):
        lists = self.com.get_data('data.csv')
        for li in lists:
            login =Login()
            login.login_go(li['username'],li['password'])
            self.com.asert_login()

    def test_login_fil(self):
        lists = self.com.get_data('data_file.csv')
        for li in lists:
            login =Login()
            login.login_go(li['username'],li['password'])
            self.com.asert_logfil()

    def test_login_success(self,username,password):

        lg = Login()
        lg.login_go(username,password)
        self.com.asert_login()
Exemple #2
0
from class_69.CBT.common import Common
from class_69.CBT.test_logn import Test_login
from class_69.CBT.test_notice import Testnotice

com = Common()

values = com.get_data('data.csv')
# sum = com.get_count("SELECT count(*) FROM `customer`")  #通过数据库获取数量
for value in values:
    username = value['username']
    password = value['password']
    verify = value['vrifyco']
    headline = value['headline']
    exp = value['exp']
    tl = Test_login()
    tl.test_login_success(username, password)
    tn = Testnotice()
    tn.test_notice(headline, exp)