def test_valid_equal_ping_responses(self): response = "20 packets transmitted, 19 received, 5% packet loss, time 19008ms" self.assertTrue(utils.valid_ping_response(response, max_loss=5))
def test_invalid_ping_responses(self): response = "20 packets transmitted, 19 received, 5% packet loss, time 19008ms" self.assertFalse(utils.valid_ping_response(response, max_loss=0))