示例#1
0
 def test_check_in_times_alternate_second(self):
     fixture = util.load_fixture('get_reservation')
     r = swa.Reservation(fixture)
     r.check_in_seconds = 42
     assert r.check_in_times == [
         '2099-08-21T07:35:42-05:00', '2099-08-17T18:50:42-05:00'
     ]
示例#2
0
 def test_get_check_in_times_with_expired(self):
     # The get_active_reservation fixture contains one flight leg which has already occurred
     fixture = util.load_fixture('get_active_reservation')
     r = swa.Reservation(fixture)
     assert r.get_check_in_times(expired=True) == [
         '2099-08-21T07:35:05-05:00', '1999-08-17T18:50:05-05:00'
     ]
示例#3
0
 def test_multiple_passengers(self):
     fixture = util.load_fixture('get_multi_passenger_reservation')
     expected = [{
         "firstName": "GEORGE",
         "lastName": "BUSH"
     }, {
         "firstName": "LAURA",
         "lastName": "BUSH"
     }]
     r = swa.Reservation(fixture)
     assert r.passengers == expected
示例#4
0
 def test_confirmation_number(self):
     fixture = util.load_fixture('get_reservation')
     r = swa.Reservation(fixture)
     assert r.confirmation_number == "ABC123"
示例#5
0
 def test_check_in_times_no_expired(self):
     # The get_active_reservation fixture contains one flight leg which has already occurred
     fixture = util.load_fixture('get_active_reservation')
     r = swa.Reservation(fixture)
     assert r.check_in_times == ['2099-08-21T07:35:05-05:00']
示例#6
0
 def test_check_in_times(self):
     fixture = util.load_fixture('get_reservation')
     r = swa.Reservation(fixture)
     assert r.check_in_times == [
         '2099-08-21T07:35:05-05:00', '2099-08-17T18:50:05-05:00'
     ]