Skip to content

Commit

Permalink
add section from to none tests
Browse files Browse the repository at this point in the history
  • Loading branch information
princefr committed Jan 13, 2025
1 parent 6581fbf commit a4f930c
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions source/jormungandr/tests/routing_tests_experimental.py
Original file line number Diff line number Diff line change
Expand Up @@ -1706,3 +1706,25 @@ def test_bike_with_parking_penalty_multiple_first_section_mode_park_mode_park_an

assert journey['sections'][0]['mode'] in ['bike', 'walking']
assert journey['sections'][1]['type'] != 'park'

def test_bike_park_section_from_to_none(self):
query = (
sub_query
+ "&datetime=20120614T075000"
+ "&first_section_mode[]=bike"
+ "&bike_speed=0.05"
+ "&park_mode=on_street"
+ "&_access_points=true"
)

response = self.query_region(query)
check_best(response)

journeys = get_not_null(response, 'journeys')
pt_journeys = [j for j in journeys if 'bike' in j['tags'] and 'non_pt_bike' not in j['tags']]
assert len(pt_journeys) > 0
print("Blablab", pt_journeys[0]["sections"][1])
for journey in pt_journeys:
assert journey['sections'][1]['type'] == 'park'
assert 'from' not in journey['sections'][1]
assert 'to' not in journey['sections'][1]

0 comments on commit a4f930c

Please sign in to comment.