def test_002_connect_clients_info(self): u"""无线网卡连接上ap后,查看客户端信息(testlink_ID:485)""" log.debug("002") tmp = ClientsBusiness(self.driver) #使用无线网卡能够连接上ssid,并正常使用 tmp.connect_DHCP_WPA_AP(data_wireless['all_ssid'], data_wireless['short_wpa'], data_basic['wlan_pc']) #获取客户端的mac地址 result1 = tmp.check_client(data_basic['wlan_pc']) wlan_mac = tmp.get_wlan_mac(data_basic['wlan_pc']) result2 = tmp.get_online_status(wlan_mac) print result1, result2 assert result1 and ( (u"在线" or 'Online') in result2), "test after connecting ap,clients info,test fail!" print "test after connecting ap,clients info,test pass!"
def test_012_disconnect_clients_info(self): u"""无线网卡断开ap后,查看客户端信息(testlink_ID:501)""" log.debug("012") tmp = ClientsBusiness(self.driver) #无线网卡断开已连接的AP tmp.wlan_disable(data_basic['wlan_pc']) #获取客户端的mac地址 result1 = tmp.check_client(data_basic['wlan_pc']) wlan_mac = tmp.get_wlan_mac(data_basic['wlan_pc']) result2 = tmp.get_offline_status(wlan_mac) print result1, result2 #删除SSID1 tmp1 = SSIDBusiness(self.driver) tmp1.del_all_NG() #使用无线网卡能够连接上ssid,并正常使用 tmp.wlan_enable(data_basic['wlan_pc']) tmp.connect_WPA_AP(data_wireless['all_ssid'], data_wireless['short_wpa'], data_basic['wlan_pc']) assert result1 and ( (u"离线" or 'Offline') in result2), "test after disconnecting ap,test fail!" print "test after disconnecting ap,test pass!"