def test_derive(self): takeoff_gross_weight = TakeoffGrossWeight() takeoff_gross_weight.set_flight_attr = Mock() liftoff_gross_weight = KPV('Gross Weight At Liftoff', items=[KeyPointValue(5, 135, 'a'), KeyPointValue(12, 120, 'b')]) takeoff_gross_weight.derive(liftoff_gross_weight) takeoff_gross_weight.set_flight_attr.assert_called_once_with(135)