Exemplo n.º 1
0
 def test_should_return_highspeed_when_flag_is_set(self):
     assert Interfaces._extract_interface_speed(
         69, 42, always_use_highspeed=True) == pytest.approx(42.0)
Exemplo n.º 2
0
 def test_should_use_speed_value_when_not_maxed_out(self):
     assert Interfaces._extract_interface_speed(
         1073741824, 0) == pytest.approx(1073.741824)
Exemplo n.º 3
0
 def test_should_use_highspeed_value_when_equal_to_speed(self):
     """Tests the behavior when agent implementation is buggy"""
     assert Interfaces._extract_interface_speed(
         1000, 1000) == pytest.approx(1000.0)
Exemplo n.º 4
0
 def test_should_use_highspeed_value_when_speed_is_maxed_out(self):
     assert Interfaces._extract_interface_speed(
         4294967295, 10000) == pytest.approx(10000.0)