Esempio n. 1
0
def test_journey_request_current_time():
    origin = {"Kisio Digital": 42}
    destination = {"Somewhere": 666}
    datetime = str_to_time_stamp("20120614T080000")
    journey_parameters = JourneyParameters(current_datetime=123456789)

    req = create_journeys_request(origin, destination, datetime, True,
                                  journey_parameters, False)
    assert req._current_datetime == 123456789
Esempio n. 2
0
def create_journeys_request_test():
    origin = {"Kisio Digital": 42}
    destination = {"Somewhere": 666}
    journey_parameters = JourneyParameters()
    datetime = str_to_time_stamp("20120614T080000")

    req = create_journeys_request(origin, destination, datetime, True,
                                  journey_parameters, False)

    assert req.requested_api == type_pb2.pt_planner
    check_basic_journeys_request(req.journeys)
    assert req.journeys.walking_transfer_penalty == 120
    assert req.journeys.arrival_transfer_penalty == 120
Esempio n. 3
0
 def journeys(self, origins, destinations, datetime, clockwise,
              journey_parameters, bike_in_pt, request_id):
     req = utils.create_journeys_request(origins, destinations, datetime,
                                         clockwise, journey_parameters,
                                         bike_in_pt)
     return self.send_and_receive(req, request_id=request_id)