From a919b876648c63d673631bdc7fa4148a15eba2f5 Mon Sep 17 00:00:00 2001 From: Mario de Frutos Date: Thu, 29 Nov 2018 16:22:34 +0100 Subject: [PATCH] Include test for valid request with route type --- .../lib/python/cartodb_services/test/test_tomtomrouting.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/server/lib/python/cartodb_services/test/test_tomtomrouting.py b/server/lib/python/cartodb_services/test/test_tomtomrouting.py index b4af624..a100b76 100644 --- a/server/lib/python/cartodb_services/test/test_tomtomrouting.py +++ b/server/lib/python/cartodb_services/test/test_tomtomrouting.py @@ -15,6 +15,7 @@ INVALID_WAYPOINTS_MIN = [Coordinate(13.42936, 52.50931)] INVALID_WAYPOINTS_MAX = [Coordinate(13.42936, 52.50931) for x in range(0, NUM_WAYPOINTS_MAX + 2)] VALID_PROFILE = DEFAULT_PROFILE +VALID_ROUTE_TYPE = 'fastest' INVALID_PROFILE = 'invalid_profile' INVALID_ROUTE_TYPE = 'invalid_route_type' @@ -54,3 +55,9 @@ class TomTomRoutingTestCase(unittest.TestCase): assert route.shape assert route.length assert route.duration + + route = self.routing.directions(VALID_WAYPOINTS, VALID_PROFILE, route_type=VALID_ROUTE_TYPE) + + assert route.shape + assert route.length + assert route.duration