|
284 | 284 | '/v2/travel/trip-parser-jobs', {'foo': 'bar'} |
285 | 285 | )) |
286 | 286 |
|
| 287 | + with it('.travel.trip_parser_jobs.post_from_base64'): |
| 288 | + self.client.travel.trip_parser_jobs.post(self.client.travel.from_base64('dGVzdA==')) |
| 289 | + expect(self.client.post).to(have_been_called_with( |
| 290 | + '/v2/travel/trip-parser-jobs', {'data': {'type': 'trip-parser-job', 'content': 'dGVzdA=='}} |
| 291 | + )) |
| 292 | + |
| 293 | + with it('.travel.trip_parser_jobs.post_from_file'): |
| 294 | + file = 'specs/namespaces/trip_parser_test.eml' |
| 295 | + self.client.travel.trip_parser_jobs.post(self.client.travel.from_file(file)) |
| 296 | + expect(self.client.post).to(have_been_called_with( |
| 297 | + '/v2/travel/trip-parser-jobs', {'data': {'type': 'trip-parser-job', 'content': 'Qm9va2luZwo='}} |
| 298 | + )) |
| 299 | + |
287 | 300 | with it('.shopping.flight_offers_search.post'): |
288 | 301 | self.client.shopping.flight_offers_search.post({'foo': 'bar'}) |
289 | 302 | expect(self.client.post).to(have_been_called_with( |
|
297 | 310 | )) |
298 | 311 |
|
299 | 312 | with it('.shopping.flight_offers.pricing.post'): |
300 | | - self.client.shopping.flight_offers.pricing.post({'foo': 'bar'}) |
| 313 | + self.client.shopping.flight_offers.pricing.post( |
| 314 | + {'foo': 'bar'}, include='other-services') |
| 315 | + expect(self.client.post).to(have_been_called_with( |
| 316 | + '/v1/shopping/flight-offers/pricing?'+'include=other-services', |
| 317 | + {'data': {'type': 'flight-offers-pricing', |
| 318 | + 'flightOffers': [{'foo': 'bar'}]}} |
| 319 | + )) |
| 320 | + |
| 321 | + with it('.shopping.flight_offers.pricing.post_list'): |
| 322 | + self.client.shopping.flight_offers.pricing.post([{'foo': 'bar'}]) |
301 | 323 | expect(self.client.post).to(have_been_called_with( |
302 | 324 | '/v1/shopping/flight-offers/pricing?', |
303 | 325 | {'data': {'type': 'flight-offers-pricing', |
|
314 | 336 | }} |
315 | 337 | )) |
316 | 338 |
|
| 339 | + with it('.shopping.booking.flight_orders.post_list'): |
| 340 | + self.client.booking.flight_orders.post( |
| 341 | + [{'foo': 'bar'}], [{'bar': 'foo'}]) |
| 342 | + expect(self.client.post).to(have_been_called_with( |
| 343 | + '/v1/booking/flight-orders', |
| 344 | + {'data': {'type': 'flight-order', |
| 345 | + 'flightOffers': [{'foo': 'bar'}], |
| 346 | + 'travelers': [{'bar': 'foo'}] |
| 347 | + }} |
| 348 | + )) |
| 349 | + |
317 | 350 | with it('.booking.flight_order().get'): |
318 | 351 | self.client.booking.flight_order('123').get(a='b') |
319 | 352 | expect(self.client.get).to(have_been_called_with( |
|
331 | 364 | 'payments': [{'bar': 'foo'}] |
332 | 365 | }} |
333 | 366 | )) |
| 367 | + with it('.shopping.booking.hotel_bookings.post_list'): |
| 368 | + self.client.booking.hotel_bookings.post('123', |
| 369 | + [{'foo': 'bar'}], |
| 370 | + [{'bar': 'foo'}]) |
| 371 | + expect(self.client.post).to(have_been_called_with( |
| 372 | + '/v1/booking/hotel-bookings', |
| 373 | + {'data': {'offerId': '123', |
| 374 | + 'guests': [{'foo': 'bar'}], |
| 375 | + 'payments': [{'bar': 'foo'}] |
| 376 | + }} |
| 377 | + )) |
0 commit comments