Beispiel #1
0
    def test_remaining_capacity_of_train_of_10_seats_and_one_reserved_seat(
            self):
        train_info = TrainInfo(
            build_seats_data(total_seats=10,
                             reserved_seats=1,
                             booking_reference=TEST_BOOKING_REFERENCE))

        self.assertTrue(train_info.can_reserve_seats(6))
        self.assertFalse(train_info.can_reserve_seats(7))
Beispiel #2
0
    def test_remaining_capacity_of_empty_train_for_10_seats(self):
        train_info = TrainInfo(build_seats_data(total_seats=10))

        self.assertTrue(train_info.can_reserve_seats(7))
        self.assertFalse(train_info.can_reserve_seats(8))