def test_002_clients_count(self): u"""用户数量统计(testlinkID:1380,1381)""" log.debug("002") #修改ssid tmp1 = SSIDSBusiness(self.s) encry_dict = {'ssid_encryption': "3", 'ssid_wpa_encryption': "0", 'ssid_wpa_key_mode': "0", 'ssid_wpa_key': data_wireless['short_wpa']} data_dict = {'ssid_ssid': data_wireless['all_ssid'], 'removed_macs': "%s,%s"%(data_ap['7600_mac'].upper(), data_ap['7600lr_mac'].upper())} tmp1.edit_ssid(data_ap['7610_mac'], 'GWN-Cloud', encry_dict, data_dict) time.sleep(120) tmp = Clients_Business(self.s) #无线网卡连接ap tmp.connect_DHCP_WPA_AP(data_wireless['all_ssid'], data_wireless['short_wpa'], data_basic["wlan_pc"]) #使用无线网卡ping internet 1分钟 tmp.set_wlan_ping_internet_1min(data_basic['lan_pc']) #等待10分钟ap上传数据到cloud time.sleep(600) tmp.dhcp_release_wlan(data_basic["wlan_pc"]) client_count = tmp.get_current_5mins_clients_count("1d") self.assertEqual(client_count, 1)
def test_005_client_count_1d(self): u"""检查1 day的client count统计数据是否正确(testlinkID:1393)""" log.debug("005") tmp = Clients_Business(self.s) client_count = tmp.get_current_5mins_clients_count("1d") self.assertEqual(client_count, 1)
def test_004_client_count_2h(self): u"""检查2 hour的client count统计数据是否正确(testlinkID:1392)""" log.debug("004") tmp = Clients_Business(self.s) client_count = tmp.get_current_5mins_clients_count("2h") self.assertEqual(client_count, 1)