Ejemplo n.º 1
0
    def test_create_session(self):
        """
        http://partners.api.skyscanner.net/apiservices/carhire/liveprices/v2/{market}/{currency}/{locale}/{pickupplace}/{dropoffplace}/{pickupdatetime}/{dropoffdatetime}/{driverage}?apiKey={apiKey}&userip={userip}
        YYYY-MM-DDThh:mm
        """
        hotels_service = Hotels(self.api_key)

        poll_url = hotels_service.create_session(market='UK',
                                                 currency='GBP',
                                                 locale='en-GB',
                                                 entityid=27543923,
                                                 checkindate=self.checkin,
                                                 checkoutdate=self.checkout,
                                                 guests=1,
                                                 rooms=1)

        self.assertTrue(poll_url)
    def test_create_session(self):
        """
        http://partners.api.skyscanner.net/apiservices/carhire/liveprices/v2/{market}/{currency}/{locale}/{pickupplace}/{dropoffplace}/{pickupdatetime}/{dropoffdatetime}/{driverage}?apiKey={apiKey}&userip={userip}
        YYYY-MM-DDThh:mm
        """
        hotels_service = Hotels(self.api_key)

        poll_url = hotels_service.create_session(
            market='UK',
            currency='GBP',
            locale='en-GB',
            entityid=27543923,
            checkindate=self.checkin,
            checkoutdate=self.checkout,
            guests=1,
            rooms=1)

        self.assertTrue(poll_url)