Example #1
0
 def test_derive(self):
     landing_datetime = LandingDatetime()
     landing_datetime.set_flight_attr = Mock()
     start_datetime = A('Start Datetime', datetime(1970, 1, 1))
     touchdown = KTI('Touchdown', items=[KeyTimeInstance(12, 'a'),
                                         KeyTimeInstance(30, 'b')])
     touchdown.frequency = 0.5
     landing_datetime.derive(start_datetime, touchdown)
     expected_datetime = datetime(1970, 1, 1, 0, 1)
     landing_datetime.set_flight_attr.assert_called_once_with(
         expected_datetime)
     touchdown = KTI('Touchdown')
     landing_datetime.set_flight_attr = Mock()
     landing_datetime.derive(start_datetime, touchdown)
     landing_datetime.set_flight_attr.assert_called_once_with(None)
Example #2
0
 def test_can_operate(self):
     self.assertEqual(LandingDatetime.get_operational_combinations(),
                      [('Start Datetime', 'Touchdown')])