def test_add_new_vehicle_invalid_new_miles(self): with self.assertRaises(Exception): mileage.addMiles('Car', -100) with self.assertRaises(Exception): mileage.addMiles('Car', 'abc') with self.assertRaises(Exception): mileage.addMiles('Car', '12.def')
def test_add_new_vehicle_no_vehicle(self): with self.assertRaises(Exception): mileage.addMiles(None, 100)