def test_get_inbound_throughput_gs(self): bigip = mock.MagicMock() gs = { 'Sys::Performance Throughput': { 'Throughput(bits)': { 'In': { 'current': 100 } } } } sh = StatHelper() conns = sh.get_inbound_throughput(bigip, global_stats=gs) assert(conns == 100)
def test_get_inbound_throughput_bigip(self): bigip = mock.MagicMock() bigip.tm.sys.performances.all_stats.load().__dict__ = ALL_STATS_1 sh = StatHelper() conns = sh.get_inbound_throughput(bigip) assert(conns == 16995)