from common.baseUnit import StartEnd
from businessView.loginView import LoginView
import unittest
import logging


class TestLogin(StartEnd):
    csv_file = '../data/account.csv'

    def test_login_by_psw(self):
        logging.info('test login by psw')
        l = LoginView(self.driver)
        data = l.get_csv_data(self.csv_file, 1)

        l.login_pwd(data[0], data[1])
        self.assertTrue(l.check_login_status())

if __name__ == '__main__':
    unittest.main()