Esempio n. 1
0
 def test_flight_sector_future(self):
     data = [
         '14293,353365012537,14295,8496,opo,1, ,lgw,319', '8496', 'OPO',
         'LGW', '1235', '1450', 'Wed20Feb', '1', 'G-EZDL', '11:35'
     ]
     result = process.process_aims_sector(data, dt.date(2000, 1, 1))
     self.assertEqual(
         result,
         Sector('8496', 'OPO', 'LGW', dt.datetime(2000, 1, 1, 12, 35),
                dt.datetime(2000, 1, 1, 14, 50), None, None, 'G-EZDL',
                False, []))
Esempio n. 2
0
 def test_ground_positioning(self):
     data = [
         '14293,353365012537,14295,8496,opo,1, ,lgw,319', '8496', 'OPO',
         'LGW', '1235', '1450', 'Wed20Feb', '3', 'PAX', '11:35'
     ]
     result = process.process_aims_sector(data, dt.date(2000, 1, 1))
     self.assertEqual(
         result,
         Sector('8496', 'OPO', 'LGW', dt.datetime(2000, 1, 1, 12, 35),
                dt.datetime(2000, 1, 1, 14, 50), None, None, None, True,
                []))
Esempio n. 3
0
 def test_quasi_sector(self):
     data = [
         None, 'LSBY', 'BRS', 'BRS', '0600', '0910', 'Fri18Jan', '1',
         '09:10', '09:10', '06:00'
     ]
     result = process.process_aims_sector(data, dt.date(2000, 1, 1))
     self.assertEqual(
         result,
         Sector('[LSBY]', 'BRS', 'BRS', dt.datetime(2000, 1, 1, 6, 0),
                dt.datetime(2000, 1, 1, 9, 10), None, None, None, False,
                []))
Esempio n. 4
0
 def test_flight_sector_over_midnight(self):
     data = [
         '14293,353365012537,14295,8496,opo,1, ,lgw,319', '8496', 'OPO',
         'LGW', '2300', '0030+1', 'Wed20Feb', '1', 'A2300', 'A0035',
         'G-EZDL', '11:35'
     ]
     result = process.process_aims_sector(data, dt.date(2000, 1, 1))
     self.assertEqual(
         result,
         Sector('8496', 'OPO', 'LGW', dt.datetime(2000, 1, 1, 23, 0),
                dt.datetime(2000, 1, 2, 0, 30),
                dt.datetime(2000, 1, 1, 23, 0),
                dt.datetime(2000, 1, 2, 0, 35), 'G-EZDL', False,
                [Crewmember("c", "CP")]))
Esempio n. 5
0
 def test_bad_aims_sector(self):
     with self.assertRaises(BadAIMSSector) as cm:
         process.process_aims_sector(1, dt.date(2000, 1, 1))
     with self.assertRaises(BadAIMSSector) as cm:
         process.process_aims_sector(["test"] * 7, dt.date(2000, 1, 1))
     data = [
         None, 'LSBY', 'BRS', 'BRS', '0600', '0910', 'Fri18Jan', '1',
         '09:10', '09:10', '06:00'
     ]
     with self.assertRaises(BadAIMSSector) as cm:
         process.process_aims_sector(data, None)