def test_042_check_reboot_dhcp_function(self): u"""验证重启后,dhcp功能正常(testlink_ID:2508)""" log.debug("042") #重启并重新登录master ap tmp1 = UpgradeBusiness(self.driver) tmp1.web_reboot(data_basic['DUT_ip']) #release,renew 有线网卡 tmp1.dhcp_release_wlan(data_basic['lan_pc']) tmp1.dhcp_wlan(data_basic['lan_pc']) #有线网卡得到ip result = tmp1.get_localIp(data_basic['lan_pc']) self.assertIn( "192.168.1", result), "check dhcp function after rebooting,,test fail!" print "check dhcp function after rebooting,test pass!"
def test_026_web_reboot(self): u"""unblock客户端,然后在ap页面上执行重启,确认无线能够连接上ap""" log.debug("026") tmp = UpgradeBusiness(self.driver) #在ap页面上执行重启 tmp.web_reboot(data_basic['DUT_ip']) #使用无线网卡能够连接上ssid,并正常使用 result = tmp.connect_WPA_AP(data_wireless['all_ssid'], data_wireless['short_wpa'], data_basic['wlan_pc']) #描述:使无线网卡释放IP地址 tmp.dhcp_release_wlan(data_basic['wlan_pc']) tmp.disconnect_ap() #测试完毕,禁用无线网卡,使pc能够上网 tmp.wlan_disable(data_basic['wlan_pc']) #rsyslog服务器完成工作 tmp.finish_rsyslog("Clients") assert data_wireless[ 'all_ssid'] in result, "test web reboot,test fail!" print "test web reboot,test pass!"