Exemplo n.º 1
0
 def test_derive(self):
     duration = Duration()
     duration.set_flight_attr = Mock()
     takeoff_dt = A('FDR Takeoff Datetime',
                    value=datetime(1970, 1, 1, 0, 1, 0))
     landing_dt = A('FDR Landing Datetime',
                    value=datetime(1970, 1, 1, 0, 2, 30))
     duration.derive(takeoff_dt, landing_dt)
     duration.set_flight_attr.assert_called_once_with(90)
Exemplo n.º 2
0
 def test_can_operate(self):
     self.assertEqual(Duration.get_operational_combinations(),
                      [('FDR Takeoff Datetime', 'FDR Landing Datetime')])