def test_get_grid_prices_by_date_xml(self): flights_cache_service = FlightsCache(self.api_key, response_format='xml') self.result = flights_cache_service.get_grid_prices_by_date( market='DE', currency='EUR', locale='de-DE', originplace='TXL', destinationplace='LHR', outbounddate=self.outbound, inbounddate=self.inbound).parsed self.assertIsNotNone(self.result.find('./Dates')) self.assertTrue(len(self.result.findall('./Dates/ArrayOfCellDto')) > 0)
def test_get_grid_prices_by_date_json(self): flights_cache_service = FlightsCache(self.api_key, response_format='json') self.result = flights_cache_service.get_grid_prices_by_date( market='GB', currency='GBP', locale='en-GB', originplace='SIN', destinationplace='KUL', outbounddate=self.outbound, inbounddate=self.inbound).parsed self.assertTrue('Dates' in self.result) self.assertTrue(len(self.result['Dates']) > 0)
def test_get_grid_prices_by_date(self): flights_cache_service = FlightsCache(self.api_key) self.result = flights_cache_service.get_grid_prices_by_date( country='UK', currency='GBP', locale='en-GB', originplace='SIN-sky', destinationplace='KUL-sky', outbounddate=self.outbound, inbounddate=self.inbound) self.assertTrue('Dates' in self.result) self.assertTrue(len(self.result['Dates']) > 0)
def test_get_grid_prices_by_date_xml(self): flights_cache_service = FlightsCache(self.api_key, response_format='xml') self.result = flights_cache_service.get_grid_prices_by_date( market='DE', currency='EUR', locale='de-DE', originplace='TXL', destinationplace='LHR', outbounddate=self.outbound, inbounddate=self.inbound).parsed self.assertTrue(None != self.result.find('./Dates')) self.assertTrue(len(self.result.findall('./Dates/ArrayOfCellDto')) > 0)
def test_get_grid_prices_by_date_json(self): flights_cache_service = FlightsCache(self.api_key, response_format='json') self.result = flights_cache_service.get_grid_prices_by_date( market='GB', currency='GBP', locale='en-GB', originplace='SIN', destinationplace='KUL', outbounddate=self.outbound, inbounddate=self.inbound).parsed self.assertTrue('Dates' in self.result) self.assertTrue(len(self.result['Dates']) > 0)
def test_get_grid_prices_by_date_xml(self): flights_cache_service = FlightsCache(self.api_key, response_format="xml") self.result = flights_cache_service.get_grid_prices_by_date( market="DE", currency="EUR", locale="de-DE", originplace="TXL", destinationplace="LHR", outbounddate=self.outbound, inbounddate=self.inbound, ).parsed self.assertTrue(None != self.result.find("./Dates")) self.assertTrue(len(self.result.findall("./Dates/ArrayOfCellDto")) > 0)
def test_get_grid_prices_by_date_json(self): flights_cache_service = FlightsCache(self.api_key, response_format="json") self.result = flights_cache_service.get_grid_prices_by_date( market="GB", currency="GBP", locale="en-GB", originplace="SIN", destinationplace="KUL", outbounddate=self.outbound, inbounddate=self.inbound, ).parsed self.assertTrue("Dates" in self.result) self.assertTrue(len(self.result["Dates"]) > 0)