@@ -165,23 +165,27 @@ def test_device_wifi():
165165 r = device .wifi ()
166166 assert len (r ) == 3
167167 assert r == [
168- DeviceWifi (True , 'AP1' , '00:00:00:00:00:00' , 'Infra' , 1 , 2400 , 130 , 82 , 'WPA1 WPA2' ),
168+ DeviceWifi (True , 'AP1' , '00:00:00:00:00:00' , 'Infra' , 1 , 2400 , 130 , 82 , 'WPA1 WPA2' ),
169169 DeviceWifi (False , 'AP2' , '00:00:00:00:00:01' , 'Infra' , 11 , 2401 , 195 , 74 , 'WPA2' ),
170170 DeviceWifi (False , 'AP3' , '00:00:00:00:00:02' , 'Infra' , 11 , 2402 , 195 , 72 , 'WPA1 WPA2' ),
171171 ]
172172 assert s .passed_parameters == ['-t' , '-f' , 'IN-USE,SSID,BSSID,MODE,CHAN,FREQ,RATE,SIGNAL,SECURITY' ,
173- 'device' , 'wifi' ]
173+ 'device' , 'wifi' , 'list' ]
174174
175175 with open (device_wifi_data_file ) as f :
176176 buf = f .read ()
177- device = DeviceControl (DummySystemCommand (buf ))
178- r = device .wifi ()
177+ s2 = DummySystemCommand (buf )
178+ device = DeviceControl (s2 )
179+ ifname = 'wlan0'
180+ r = device .wifi (ifname )
179181 assert len (r ) == 3
180182 assert r == [
181183 DeviceWifi (False , '' , '00:00:00:00:00:00' , 'Infra' , 11 , 2400 , 195 , 72 , 'WPA1 WPA2' ),
182184 DeviceWifi (False , 'AP1' , '00:00:00:00:00:01' , 'Infra' , 4 , 2401 , 130 , 40 , 'WPA1 WPA2' ),
183185 DeviceWifi (False , 'AP2' , '00:00:00:00:00:02' , 'Infra' , 6 , 2402 , 65 , 24 , 'WPA2' ),
184186 ]
187+ assert s2 .passed_parameters == ['-t' , '-f' , 'IN-USE,SSID,BSSID,MODE,CHAN,FREQ,RATE,SIGNAL,SECURITY' ,
188+ 'device' , 'wifi' , 'list' , 'ifname' , ifname ]
185189
186190
187191def test_wifi_connect ():
0 commit comments