def test_002_check_country_default_setting(self): u"""国家检查默认配置(testlink_ID:1623)""" log.debug("002") tmp = SettingsBusiness(self.s) #获取默认国家信息 country = tmp.get_countryDomain() #在AP CLI下查看国家默认配置 ssh_pwd = tmp.get_ssh_pwd() result_7600 = tmp.get_cli_country(data_basic['7600_ip'], data_basic['sshUser'], ssh_pwd) result_7610 = tmp.get_cli_country(data_basic['7610_ip'], data_basic['sshUser'], ssh_pwd) result_7600lr = tmp.get_cli_country(data_basic['7600lr_ip'], data_basic['sshUser'], ssh_pwd) self.assertEqual("US", country) self.assertIn("840", result_7600) self.assertIn("840", result_7610) self.assertIn("840", result_7600lr)
def test_005_reset_ap_check_country(self): u"""重置验证国家(testlink_ID:1628)""" log.debug("005") #删除7600 tmp1 = APSBusiness(self.s) tmp1.delete_ap(data_ap['7600_mac']) time.sleep(360) tmp = SettingsBusiness(self.s) result = tmp.get_cli_country(data_basic['7600_ip'], data_basic['sshUser'], "admin") self.assertIn("840", result)
def test_004_reboot_ap_check_country(self): u"""页面重启验证国家(testlink_ID:1626)""" log.debug("004") #重启7600 tmp1 = APSBusiness(self.s) tmp1.reboot_one_ap(data_ap['7600_mac']) time.sleep(420) tmp = SettingsBusiness(self.s) #在AP CLI下查看国家默认配置 ssh_pwd = tmp.get_ssh_pwd() result = tmp.get_cli_country(data_basic['7600_ip'], data_basic['sshUser'], ssh_pwd) self.assertIn("156", result)
def test_003_change_country_setting(self): u"""验证修改国家配置是否生效(testlink_ID:1624)""" log.debug("003") tmp = SettingsBusiness(self.s) #修改国家为中国 tmp.set_setting({'countryDomain':"CN"}) time.sleep(60) #在AP CLI下查看国家默认配置 ssh_pwd = tmp.get_ssh_pwd() result1 = tmp.get_cli_country(data_basic['7600_ip'], data_basic['sshUser'], ssh_pwd) result2 = tmp.get_cli_ath0_country(data_basic['7600_ip'], data_basic['sshUser'], ssh_pwd) result3 = tmp.get_cli_ath1_country(data_basic['7600_ip'], data_basic['sshUser'], ssh_pwd) self.assertIn("156", result1) self.assertIn("156", result2) self.assertIn("156", result3)