def test_07_user_login_RestrictedAccounts(self): """限制账号登录""" logging.info('==限制账号登录==') login = LoginView(self.driver) data = login.get_csv_data('../data/test_data/login_data.csv', 7) login.login_action(data[0], data[1]) sleep(2) self.assertTrue(login.check_login_fail_status())
def test_08_user_login_DeactivatedAccount(self): """停用账号登录""" logging.info('==停用账号登录==') login = LoginView(self.driver) data = login.get_csv_data('../data/test_data/login_data.csv', 8) login.login_action(data[0], data[1]) sleep(2) self.assertTrue(login.check_login_fail_status())
def test_06_user_login_phonenumEmpty(self): """ 手机号为空登录""" logging.info('==手机号为空登录==') login = LoginView(self.driver) data = login.get_csv_data('../data/test_data/login_data.csv', 6) login.login_action(data[0], data[1]) sleep(2) self.assertTrue(login.check_login_fail_status())
def test_05_user_login_unregistered(self): """未注册账号登录""" logging.info('==未注册账号登录==') login = LoginView(self.driver) data = login.get_csv_data('../data/test_data/login_data.csv', 5) login.login_action(data[0], data[1]) sleep(2) self.assertTrue(login.check_login_fail_status())
def test_03_user_login_pwdempty(self): """密码为空登录""" logging.info('==正常账号密码为空登录==') login = LoginView(self.driver) data = login.get_csv_data('../data/test_data/login_data.csv', 3) login.login_action(data[0], data[1]) sleep(2) self.assertTrue(login.check_login_fail_status())
def test_02_user_login_pwderr(self): """密码错误登录用例""" logging.info('==正确账号密码错误登录=') login = LoginView(self.driver) data = login.get_csv_data('../data/test_data/login_data.csv', 2) login.login_action(data[0], data[1]) sleep(2) self.assertTrue(login.check_login_fail_status())
def test_01_user_login(self): """正常登录用例""" logging.info('==正常账号成功登录用例==') login = LoginView(self.driver) data = login.get_csv_data('../data/test_data/login_data.csv', 1) login.login_action(data[0], data[2]) sleep(2) self.assertTrue(login.check_login_success_status())
def login_action(self): login = LoginView(self.driver) data = login.get_csv_data('../data/product_data/login_data.csv', 1) login.login_action(data[0], data[2])