示例#1
0
 def setUpTestData(cls):
     meeting1 = create_meeting("1", date(2019, 8, 30), True)
     cls.ts = create_time_slot(meeting1,
                               tz.make_aware(datetime(2019, 8, 31, 10)), 3)
     user = create_user('testuser', '12345')
     cls.ulm = create_ulm(user.pilot, 'F-XAAA')
     create_reservation('FAE1F6', cls.ulm, cls.ts)
示例#2
0
    def setUpTestData(cls):
        cls.meeting = create_meeting("1", date(2019, 8, 30), True)
        cls.ts = create_time_slot(cls.meeting,
                                  tz.make_aware(datetime(2019, 8, 31, 10)), 3)
        cls.user = create_user('testuser', '12345')

        cls.ulm = create_ulm(cls.user.pilot, 'F-XAAA')
示例#3
0
 def setUpTestData(cls):
     super().setUpTestData()
     meeting = create_meeting("1", date(2019, 8, 30), True)
     ts1 = create_time_slot(meeting,
                            tz.make_aware(datetime(2019, 8, 31, 10)), 5)
     ts2 = create_time_slot(meeting,
                            tz.make_aware(datetime(2019, 8, 31, 11)), 5)
     user = create_user('testuser', '12345')
     ulm = create_ulm(user.pilot, 'F-JLOV')
     cls.res1 = create_reservation('FAE1F6',
                                   ulm,
                                   ts1,
                                   ts2,
                                   fuel_reservation=10)
     user = create_user('testuser2', '12345')
     ulm = create_ulm(user.pilot, 'F-JLAV')
     cls.res2 = create_reservation('FAE1F7', ulm, ts1, ts2)
示例#4
0
 def setUpTestData(cls):
     meeting = create_meeting("1", date(2019, 8, 30), True)
     cls.ts1 = create_time_slot(meeting,
                                tz.make_aware(
                                 datetime(2019, 8, 31, 10)),
                                3, 3)
     cls.ts2 = create_time_slot(meeting,
                                tz.make_aware(
                                 datetime(2019, 8, 31, 11)),
                                3, 3)
     cls.ts3 = create_time_slot(meeting,
                                tz.make_aware(
                                 datetime(2019, 8, 31, 12)),
                                0, 0)
     cls.user = create_user("user", "testtest")
     user2 = create_user("user2", "testtest")
     cls.ulm = create_ulm(cls.user.pilot, 'F-JAZE')
     create_ulm(user2.pilot, 'F-JAZR')
示例#5
0
    def setUpTestData(cls):
        super().setUpTestData()
        meeting1 = create_meeting("1", date(2019, 8, 30), True)
        ts = create_time_slot(meeting1,
                              tz.make_aware(
                                  datetime(2019, 8, 31, 10)),
                              3)

        ulm = create_ulm(cls.user.pilot, 'F-XAAA')
        for i in range(PAGINATED_BY+1):
            create_reservation(str(i), ulm, ts)
示例#6
0
 def setUpTestData(cls):
     super().setUpTestData()
     meeting1 = create_meeting("1", date(2019, 8, 30), True)
     cls.ts1 = create_time_slot(meeting1,
                                tz.make_aware(
                                     datetime(2019, 8, 31, 10)),
                                3)
     cls.ts2 = create_time_slot(meeting1,
                                tz.make_aware(
                                     datetime(2019, 8, 31, 11)),
                                3)
     cls.ulm = create_ulm(cls.user.pilot, 'F-JAZE')
示例#7
0
 def setUpTestData(cls):
     meeting = create_meeting("1", date(2019, 8, 30), True)
     ts1 = create_time_slot(meeting,
                            tz.make_aware(datetime(2019, 8, 31, 10)), 5)
     ts2 = create_time_slot(meeting,
                            tz.make_aware(datetime(2019, 8, 31, 11)), 5)
     user = create_user('testuser', '12345')
     Pilot.objects.filter(user=user).update(
         # insurance_company='AISCAIR',
         insurance_number='12345',
         licence_number='54321')
     ulm = create_ulm(user.pilot, 'F-JLOV')
     create_reservation('FAE1F6', ulm, ts1, ts2,
                        tz.make_aware(datetime(2019, 8, 31, 11)))
示例#8
0
    def setUpTestData(cls):
        super().setUpTestData()
        meeting1 = create_meeting("1", date(2019, 8, 30), True)
        cls.ts1 = create_time_slot(meeting1,
                                   tz.make_aware(
                                        datetime(2019, 8, 31, 10)),
                                   3)
        cls.ts2 = create_time_slot(meeting1,
                                   tz.make_aware(
                                        datetime(2019, 8, 31, 11)),
                                   3)

        cls.ulm = create_ulm(cls.user.pilot, 'F-XAAA')
        cls.res = create_reservation("abcd", cls.ulm, cls.ts1, cls.ts2)
示例#9
0
    def setUpTestData(cls):
        meeting1 = create_meeting("1", date(2019, 8, 30), True)
        meeting2 = create_meeting("2", date(2018, 8, 30), False)
        cls.ts = create_time_slot(meeting1,
                                  tz.make_aware(datetime(2019, 8, 31, 10)), 3,
                                  1)

        cls.ts3 = create_time_slot(meeting1,
                                   tz.make_aware(datetime(2019, 8, 31, 11)), 2,
                                   2)
        cls.ts2 = create_time_slot(meeting2,
                                   tz.make_aware(datetime(2018, 8, 31, 11)), 3,
                                   2)
        user = create_user('testuser', '12345')
        ulm = create_ulm(user.pilot, 'F-XAAA')
        create_reservation('FAE1F6', ulm, cls.ts, cls.ts2)
        create_reservation('FAD1F7', ulm, cls.ts, cls.ts2)
示例#10
0
 def test_normalize_ulm(self):
     create_ulm(self.user.pilot, 'f-jaer')
     self.assertEqual(
         ULM.objects.get(pilot=self.user.pilot).radio_id, 'F-JAER')
示例#11
0
 def setUpTestData(cls):
     super().setUpTestData()
     cls.ulm = create_ulm(cls.user.pilot, 'F-JAZE')
示例#12
0
    def setUpTestData(cls):
        super().setUpTestData()

        for i in range(PAGINATED_BY+1):
            create_ulm(cls.user.pilot, 'F-JAZE')