Exemple #1
0
 def test_007_offline_ap_check_timezone(self):
     u"""AP离线时配置时区(testlink_ID:1643)"""
     log.debug("007")
     #重启7600
     tmp1 = APSBusiness(self.s)
     tmp1.reboot_one_ap(data_ap['7600_mac'])
     time.sleep(100)
     #修改时区为GWT
     tmp = SettingsBusiness(self.s)
     tmp.set_setting({'timezone':"Etc/GMT"})
     time.sleep(320)
     #获取ap cli的时区
     ssh_pwd = tmp.get_ssh_pwd()
     result = tmp.get_cli_timezone(data_basic['7600_ip'],
             data_basic['sshUser'], ssh_pwd)
     self.assertIn("+0000", result)
Exemple #2
0
 def test_006_reboot_ap_check_timezone(self):
     u"""重启AP之后查看时区(testlink_ID:1642)"""
     log.debug("006")
     #7600再添加回cloud
     tmp1 = APSBusiness(self.s)
     tmp1.add_ap_2_local_cloud(data_basic['7600_ip'], data_ap['7600_mac'], "autotest_7600")
     #修改时区为北京
     tmp = SettingsBusiness(self.s)
     tmp.set_setting({'timezone':"Asia/Shanghai"})
     time.sleep(60)
     #然后重启7600
     tmp1.reboot_one_ap(data_ap['7600_mac'])
     time.sleep(420)
     #获取ap cli的时区
     ssh_pwd = tmp.get_ssh_pwd()
     result = tmp.get_cli_timezone(data_basic['7600_ip'],
             data_basic['sshUser'], ssh_pwd)
     self.assertIn("+0800", result)