|
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( |
| 289 | + self.client.travel.from_base64('dGVzdA==')) |
| 290 | + expect(self.client.post).to(have_been_called_with( |
| 291 | + '/v2/travel/trip-parser-jobs', |
| 292 | + {'data': {'type': 'trip-parser-job', 'content': 'dGVzdA=='}} |
| 293 | + )) |
| 294 | + |
| 295 | + with it('.travel.trip_parser_jobs.post_from_file'): |
| 296 | + file = 'specs/namespaces/trip_parser_test.eml' |
| 297 | + self.client.travel.trip_parser_jobs.post( |
| 298 | + self.client.travel.from_file(file)) |
| 299 | + expect(self.client.post).to(have_been_called_with( |
| 300 | + '/v2/travel/trip-parser-jobs', |
| 301 | + {'data': {'type': 'trip-parser-job', 'content': 'Qm9va2luZwo='}} |
| 302 | + )) |
| 303 | + |
287 | 304 | with it('.shopping.flight_offers_search.post'): |
288 | 305 | self.client.shopping.flight_offers_search.post({'foo': 'bar'}) |
289 | 306 | expect(self.client.post).to(have_been_called_with( |
|
297 | 314 | )) |
298 | 315 |
|
299 | 316 | with it('.shopping.flight_offers.pricing.post'): |
300 | | - self.client.shopping.flight_offers.pricing.post({'foo': 'bar'}) |
| 317 | + self.client.shopping.flight_offers.pricing.post( |
| 318 | + {'foo': 'bar'}, include='other-services') |
| 319 | + expect(self.client.post).to(have_been_called_with( |
| 320 | + '/v1/shopping/flight-offers/pricing?'+'include=other-services', |
| 321 | + {'data': {'type': 'flight-offers-pricing', |
| 322 | + 'flightOffers': [{'foo': 'bar'}]}} |
| 323 | + )) |
| 324 | + |
| 325 | + with it('.shopping.flight_offers.pricing.post_list'): |
| 326 | + self.client.shopping.flight_offers.pricing.post([{'foo': 'bar'}]) |
301 | 327 | expect(self.client.post).to(have_been_called_with( |
302 | 328 | '/v1/shopping/flight-offers/pricing?', |
303 | 329 | {'data': {'type': 'flight-offers-pricing', |
|
314 | 340 | }} |
315 | 341 | )) |
316 | 342 |
|
| 343 | + with it('.shopping.booking.flight_orders.post_list'): |
| 344 | + self.client.booking.flight_orders.post( |
| 345 | + [{'foo': 'bar'}], [{'bar': 'foo'}]) |
| 346 | + expect(self.client.post).to(have_been_called_with( |
| 347 | + '/v1/booking/flight-orders', |
| 348 | + {'data': {'type': 'flight-order', |
| 349 | + 'flightOffers': [{'foo': 'bar'}], |
| 350 | + 'travelers': [{'bar': 'foo'}] |
| 351 | + }} |
| 352 | + )) |
| 353 | + |
317 | 354 | with it('.booking.flight_order().get'): |
318 | 355 | self.client.booking.flight_order('123').get(a='b') |
319 | 356 | expect(self.client.get).to(have_been_called_with( |
|
331 | 368 | 'payments': [{'bar': 'foo'}] |
332 | 369 | }} |
333 | 370 | )) |
| 371 | + with it('.shopping.booking.hotel_bookings.post_list'): |
| 372 | + self.client.booking.hotel_bookings.post('123', |
| 373 | + [{'foo': 'bar'}], |
| 374 | + [{'bar': 'foo'}]) |
| 375 | + expect(self.client.post).to(have_been_called_with( |
| 376 | + '/v1/booking/hotel-bookings', |
| 377 | + {'data': {'offerId': '123', |
| 378 | + 'guests': [{'foo': 'bar'}], |
| 379 | + 'payments': [{'bar': 'foo'}] |
| 380 | + }} |
| 381 | + )) |
0 commit comments