Esempio n. 1
0
    def test_distance_driven_is_number(self):
        test_car = Car("red", 120, "auto", "85", 100)
        res = test_car.get_distance_driven()

        # Test that the result is a number
        self.assertIsInstance(res, int, "Result should be a number")

        # Test that the result is the correct number (8500)
        self.assertEqual(res, 8500, "Result should be 8500 (85 x 100)")