Beispiel #1
0
    def test_exception(self, monkeypatch, device_option):
        if device_option is None:
            pytest.skip("device option is null")

        monkeypatch.setattr("tcconfig._network._read_iface_speed", self.raise_ioerror)

        assert get_no_limit_kbits(device_option) == _get_iproute2_upper_limite_rate()
Beispiel #2
0
    def test_normal_paravirt(self, monkeypatch, device_option, speed, expected):
        if device_option is None:
            pytest.skip("device option is null")

        monkeypatch.setattr("tcconfig._network._read_iface_speed", lambda x: speed)

        assert get_no_limit_kbits(device_option) == expected