def test_TrafficControl_validate_bandwidth_rate_normal(value): tc_obj = TrafficControl( "dummy", bandwidth_rate=value, direction=TrafficDirection.OUTGOING, shaping_algorithm=ShapingAlgorithm.HTB, ) tc_obj.validate_bandwidth_rate()
def test_TrafficControl_validate_bandwidth_rate_exception_2(value, expected): with pytest.raises(expected): tc_obj = TrafficControl( "dummy", bandwidth_rate=value, latency_time=Tc.ValueRange.LatencyTime.MIN, latency_distro_time=Tc.ValueRange.LatencyTime.MIN, shaping_algorithm=ShapingAlgorithm.HTB) tc_obj.validate_bandwidth_rate()
def test_TrafficControl_validate_bandwidth_rate_exception_2(value, expected): tc_obj = TrafficControl("dummy", bandwidth_rate=value) with pytest.raises(expected): tc_obj.validate_bandwidth_rate()
def test_TrafficControl_validate_bandwidth_rate_normal(value): tc_obj = TrafficControl("dummy", bandwidth_rate=value) tc_obj.validate_bandwidth_rate()
def test_TrafficControl_validate_bandwidth_rate_exception_1(value, expected): with pytest.raises(expected): tc_obj = TrafficControl( "dummy", bandwidth_rate=value, direction=TrafficDirection.OUTGOING) tc_obj.validate_bandwidth_rate()
def test_TrafficControl_validate_bandwidth_rate_normal(value): tc_obj = TrafficControl( "dummy", bandwidth_rate=value, direction=TrafficDirection.OUTGOING) tc_obj.validate_bandwidth_rate()