Esempio n. 1
0
def test_parseStaInfo():
    row = {}
    macSta = "10:D7:B0:1A:96:6F"
    row = parseStaInfo(sta_info, macSta)
    assert row['BH_STA_INFO_TX_FAILURES_'+macSta] == 11
    assert row['BH_STA_INFO_BANDWIDTH_'+macSta] == 80
    assert row['BH_STA_INFO_UPTIME_'+macSta] == 13416
    assert row['BH_STA_INFO_DECRYPT_FAILURE_'+macSta] == 0
Esempio n. 2
0
def test_parseStaInfoMissingParam():
    row = {}
    macSta = "10:D7:B0:1A:96:6F"
    row = parseStaInfo(sta_info_UptimeFloat, macSta)
    assert row['BH_STA_INFO_TX_FAILURES_'+macSta] == 11
    assert row['BH_STA_INFO_BANDWIDTH_'+macSta] == 80
    assert row['BH_STA_INFO_UPTIME_'+macSta] == 13416333333
    assert row['BH_STA_INFO_DECRYPT_FAILURE_'+macSta] == 0
Esempio n. 3
0
def test_parseStaInfoKOInField():
    row = {}
    macSta = "80:20:DA:EE:89:A7"
    row = parseStaInfo(sta_info_KOinField, macSta)
    assert row['BH_STA_INFO_TX_FAILURES_'+macSta] == 6
    assert row['BH_STA_INFO_BANDWIDTH_'+macSta] == 80
    assert row['BH_STA_INFO_UPTIME_'+macSta] == 339317
    assert row['BH_STA_INFO_DECRYPT_FAILURE_'+macSta] == 0
Esempio n. 4
0
def test_parseStaInfoMissingParam():
    row = {}
    macSta = "10:D7:B0:1A:96:6F"
    row = parseStaInfo(sta_info_missingBandwidth, macSta)
    assert row['BH_STA_INFO_TX_FAILURES_'+macSta] == 11
    assert 'BH_STA_INFO_BANDWIDTH_'+macSta not in row
    assert row['BH_STA_INFO_UPTIME_'+macSta] == 13416
    assert row['BH_STA_INFO_DECRYPT_FAILURE_'+macSta] == 0
Esempio n. 5
0
def test_parseStaInfoEmpty():
    row = {}
    macSta = "10:D7:B0:1A:96:6F"
    row = parseStaInfo("", macSta)
    assert len(row) == 0