def test_get_cheapest_price_by_date_xml(self):
        flights_cache_service = FlightsCache(self.api_key, response_format='xml')
        self.result = flights_cache_service.get_cheapest_price_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('./Quotes'))
        self.assertTrue(len(self.result.findall('./Quotes/QuoteDto')) > 0)
    def test_get_cheapest_price_by_date_json(self):
        flights_cache_service = FlightsCache(self.api_key, response_format='json')
        self.result = flights_cache_service.get_cheapest_price_by_date(
            market='GB',
            currency='GBP',
            locale='en-GB',
            originplace='SIN',
            destinationplace='KUL',
            outbounddate=self.outbound,
            inbounddate=self.inbound).parsed

        self.assertTrue('Quotes' in self.result)
        self.assertTrue(len(self.result['Quotes']) > 0)
    def test_get_cheapest_price_by_date(self):
        flights_cache_service = FlightsCache(self.api_key)
        self.result = flights_cache_service.get_cheapest_price_by_date(
            country='UK',
            currency='GBP',
            locale='en-GB',
            originplace='SIN-sky',
            destinationplace='KUL-sky',
            outbounddate=self.outbound,
            inbounddate=self.inbound)

        self.assertTrue('Quotes' in self.result)
        self.assertTrue(len(self.result['Quotes']) > 0)
    def test_get_cheapest_price_by_date_xml(self):
        flights_cache_service = FlightsCache(self.api_key,
                                             response_format='xml')
        self.result = flights_cache_service.get_cheapest_price_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('./Quotes'))
        self.assertTrue(len(self.result.findall('./Quotes/QuoteDto')) > 0)
    def test_get_cheapest_price_by_date_json(self):
        flights_cache_service = FlightsCache(self.api_key,
                                             response_format='json')
        self.result = flights_cache_service.get_cheapest_price_by_date(
            market='GB',
            currency='GBP',
            locale='en-GB',
            originplace='SIN',
            destinationplace='KUL',
            outbounddate=self.outbound,
            inbounddate=self.inbound).parsed

        self.assertTrue('Quotes' in self.result)
        self.assertTrue(len(self.result['Quotes']) > 0)
    def test_get_cheapest_price_by_date_xml(self):
        flights_cache_service = FlightsCache(self.api_key, response_format="xml")
        self.result = flights_cache_service.get_cheapest_price_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("./Quotes"))
        self.assertTrue(len(self.result.findall("./Quotes/QuoteDto")) > 0)
    def test_get_cheapest_price_by_date_json(self):
        flights_cache_service = FlightsCache(self.api_key, response_format="json")
        self.result = flights_cache_service.get_cheapest_price_by_date(
            market="GB",
            currency="GBP",
            locale="en-GB",
            originplace="SIN",
            destinationplace="KUL",
            outbounddate=self.outbound,
            inbounddate=self.inbound,
        ).parsed

        self.assertTrue("Quotes" in self.result)
        self.assertTrue(len(self.result["Quotes"]) > 0)