| #!/usr/bin/python2.7 |
| """Tests for ifstats_skids.""" |
| |
| import ifstats |
| from wvtest import wvtest |
| |
| |
| @wvtest.wvtest |
| def ParseSavedStatusWireless(): |
| with open('testdata/skids/status_wireless.html') as status_wireless: |
| text = status_wireless.read() |
| res = ifstats.skids.ParseStatusWireless(text) |
| wvtest.WVPASSEQ(res, { |
| 'Wireless Band': '802.11ac', |
| 'AP Mac Address (BSSID)': '00:26:86:F0:22:C9', |
| 'Bytes Transmitted': '193033536', |
| 'Device Mode': 'Station (STA)', |
| 'Packets Received Successfully': '12351163', |
| 'Association Status': 'Associated', |
| 'Bandwidth': '80 MHz', |
| 'RSSI': '-20', |
| 'Packets Transmitted Successfully': '9372546', |
| 'Bytes Received': '2814237224', |
| 'Channel': '108' |
| }) |
| |
| if __name__ == '__main__': |
| wvtest.wvtest_main() |