Esempio n. 1
0
 def test_024_modify_ssid(self):
     u"""更改client所在的ssid名称后显示(testlinkID:1452)"""
     log.debug("024")
     #修改ssid2的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']+"-3"}
     tmp1.edit_ssid(data_ap['7600_mac'], data_wireless['all_ssid']+"-2",
                    encry_dict, data_dict)
     time.sleep(120)
     tmp = Clients_Business(self.s)
     tmp.connect_WPA_AP(data_wireless['all_ssid']+"-3",
             data_wireless['short_wpa'], data_basic["wlan_pc"])
     time.sleep(120)
     # tmp.dhcp_release_wlan(data_basic["wlan_pc"])
     #客户端-状态,获取第一个客户端的信息
     # #使用用户名密码,带着cookie登录cloud,并返回响应数据
     # tmp.webLogin(data_basic['cloud_user'], data_basic['cloud_pwd'])
     client_info = tmp.get_first_client_info()
     AP_ssid = client_info['ssid']
     #删除ssid2
     tmp1.delete_ssid(data_wireless['all_ssid']+"-3")
     self.assertEqual(AP_ssid, data_wireless['all_ssid']+"-3")
Esempio n. 2
0
    def test_010_client_mac(self):
        u"""验证客户端mac信息正确(testlinkID:1408)"""
        log.debug("010")

        #修改ssid改为7600
        tmp1 = SSIDSBusiness(self.s)
        #修改为5G
        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_band': "5",
                    'removed_macs': "%s,%s"%(data_ap['7610_mac'].upper(),
                                             data_ap['7600lr_mac'].upper())}
        tmp1.edit_ssid(data_ap['7600_mac'], data_wireless['all_ssid'],
                       encry_dict, data_dict)
        time.sleep(120)

        tmp = Clients_Business(self.s)
        tmp.connect_WPA_AP(data_wireless['all_ssid'],
                data_wireless['short_wpa'], data_basic["wlan_pc"])
        time.sleep(120)
        # tmp.dhcp_release_wlan(data_basic["wlan_pc"])
        # #使用用户名密码,带着cookie登录cloud,并返回响应数据
        # tmp.webLogin(data_basic['cloud_user'], data_basic['cloud_pwd'])
        #客户端-状态,获取第一个客户端的信息
        client_info = tmp.get_first_client_info()
        client_mac = client_info['clientId']
        wlan_mac = tmp.get_wlan_mac(data_basic['wlan_pc']).upper()
        self.assertEqual(client_mac, wlan_mac)
Esempio n. 3
0
 def test_021_client_change_connect_ssid(self):
     u"""验证client的ssid信息(testlinkID:1419)"""
     log.debug("021")
     #client切换ssid
     tmp = Clients_Business(self.s)
     tmp.connect_WPA_AP(data_wireless['all_ssid'],
             data_wireless['short_wpa'], data_basic["wlan_pc"])
     time.sleep(120)
     # tmp.dhcp_release_wlan(data_basic["wlan_pc"])
     #客户端-状态,获取第一个客户端的信息
     # #使用用户名密码,带着cookie登录cloud,并返回响应数据
     # tmp.webLogin(data_basic['cloud_user'], data_basic['cloud_pwd'])
     client_info = tmp.get_first_client_info()
     AP_ssid = client_info['ssid']
     self.assertEqual(AP_ssid, data_wireless['all_ssid'])
Esempio n. 4
0
 def test_023_check_channel(self):
     u"""设置信道,客户端连接后,信道信息核对(testlinkID:1448)"""
     log.debug("023")
     #修改7610的5G信道为157
     tmp1 = APSBusiness(self.s)
     tmp1.edit_ap(data_ap['7610_mac'], {'ap_5g_channel': "157"})
     time.sleep(120)
     tmp = Clients_Business(self.s)
     tmp.connect_WPA_AP(data_wireless['all_ssid'],
             data_wireless['short_wpa'], data_basic["wlan_pc"])
     time.sleep(120)
     # tmp.dhcp_release_wlan(data_basic["wlan_pc"])
     # #客户端-状态,获取第一个客户端的信息
     # #使用用户名密码,带着cookie登录cloud,并返回响应数据
     # tmp.webLogin(data_basic['cloud_user'], data_basic['cloud_pwd'])
     client_info = tmp.get_first_client_info()
     channel = client_info['channel']
     self.assertEqual(channel, 157)
Esempio n. 5
0
 def test_016_client_total_change_ssid(self):
     u"""切换ssid后的client流量(testlinkID:1414)"""
     log.debug("016")
     #新建ssid2并加入7600ap中
     tmp2 = SSIDSBusiness(self.s)
     tmp2.add_ssid(data_ap['7600_mac'], data_wireless['all_ssid']+"-2",
                  data_wireless['short_wpa'])
     time.sleep(120)
     #无线网卡连接ssid2
     tmp = Clients_Business(self.s)
     tmp.connect_WPA_AP(data_wireless['all_ssid']+"-2",
             data_wireless['short_wpa'], data_basic["wlan_pc"])
     time.sleep(120)
     # tmp.dhcp_release_wlan(data_basic["wlan_pc"])
     #客户端-状态,获取第一个客户端的信息
     # #使用用户名密码,带着cookie登录cloud,并返回响应数据
     # tmp.webLogin(data_basic['cloud_user'], data_basic['cloud_pwd'])
     client_info = tmp.get_first_client_info()
     client_total = client_info['totalBytes']
     #总流量小于1M
     self.assertLessEqual(client_total, (1*1024*1024))
Esempio n. 6
0
 def test_019_client_radio_5g(self):
     u"""radio信息核对-2.4G(testlinkID:1417-2)"""
     log.debug("019")
     #修改ssid2为5g
     tmp2 = 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_band': "5"}
     tmp2.edit_ssid(data_ap['7600_mac'], data_wireless['all_ssid']+"-2",
                    encry_dict, data_dict)
     time.sleep(120)
     tmp = Clients_Business(self.s)
     tmp.connect_WPA_AP(data_wireless['all_ssid']+"-2",
             data_wireless['short_wpa'], data_basic["wlan_pc"])
     time.sleep(120)
     # tmp.dhcp_release_wlan(data_basic["wlan_pc"])
     #客户端-状态,获取第一个客户端的信息
     # #使用用户名密码,带着cookie登录cloud,并返回响应数据
     # tmp.webLogin(data_basic['cloud_user'], data_basic['cloud_pwd'])
     client_info = tmp.get_first_client_info()
     channelClass = client_info['channelClass']
     self.assertEqual(channelClass, 5)