def setUpTestData(cls): meeting = create_meeting("1", date(2019, 8, 30), True) user1 = create_user('user1', '12345') user2 = create_user('user2', '12345') user3 = create_user('user3', '12345') create_full_reservation(res_num='FAE1F6', user=user1, meeting=meeting) create_full_reservation(res_num='FAE1F7', user=user2, meeting=meeting) create_full_reservation(res_num='FAE1F8', user=user3, meeting=meeting, confirmed=True)
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)
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')
def test_logged_template(self): user = create_user("user", "testtest") self.client.force_login(user) if self.logged_template_name != '': response = self.client.get(self.get_url()) self.assertEqual(response.status_code, 200) self.assertTemplateUsed(response, self.logged_template_name)
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)
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')
def setUpTestData(cls): meeting = utils.create_meeting('1', date(2019, 8, 30)) cls.res1 = utils.create_full_reservation(res_num='11111', meeting=meeting, arrival=tz.make_aware( datetime(2019, 8, 30, 10))) user = utils.create_user('testuser2', '12345') cls.res2 = utils.create_full_reservation(res_num='22222', meeting=meeting, user=user)
def setUpTestData(cls): meeting = create_meeting("1", date(2019, 8, 30), True) meeting2 = create_meeting("2", date(2018, 8, 30), False) user1 = create_user('user1', '12345') user2 = create_user('user2', '12345') user3 = create_user('user3', '12345') create_full_reservation(res_num='FAAAAA', meeting=meeting2) res1 = create_full_reservation(res_num='FAE1F6', user=user1, meeting=meeting) res2 = create_full_reservation(res_num='FAE1F7', user=user2, meeting=meeting, canceled=True) res3 = create_full_reservation(res_num='FAE1F8', user=user3, meeting=meeting, confirmed=True) cls.actives = [res1, res2, res3] cls.unconfirmed_actives = [res1]
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)))
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)
def setUpTestData(cls): cls.user = create_user('testuser', '12345')
def setUpTestData(cls): super().setUpTestData() cls.res = create_full_reservation(user=cls.user) user = create_user('user2', 'ddddd') cls.res2 = create_full_reservation('2', user=user)