From 98a4ed81c549ad5941d8f97f9e9cb5f0d9f3e2e6 Mon Sep 17 00:00:00 2001 From: Mario de Frutos Date: Thu, 29 Nov 2018 16:16:22 +0100 Subject: [PATCH] Add test for route type verification --- server/lib/python/cartodb_services/test/test_tomtomrouting.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/server/lib/python/cartodb_services/test/test_tomtomrouting.py b/server/lib/python/cartodb_services/test/test_tomtomrouting.py index fab18c4..b4af624 100644 --- a/server/lib/python/cartodb_services/test/test_tomtomrouting.py +++ b/server/lib/python/cartodb_services/test/test_tomtomrouting.py @@ -16,6 +16,7 @@ INVALID_WAYPOINTS_MAX = [Coordinate(13.42936, 52.50931) for x in range(0, NUM_WAYPOINTS_MAX + 2)] VALID_PROFILE = DEFAULT_PROFILE INVALID_PROFILE = 'invalid_profile' +INVALID_ROUTE_TYPE = 'invalid_route_type' class TomTomRoutingTestCase(unittest.TestCase): @@ -43,6 +44,9 @@ class TomTomRoutingTestCase(unittest.TestCase): with self.assertRaises(ServiceException): invalid_routing.directions(VALID_WAYPOINTS, VALID_PROFILE) + def test_invalid_route_type(self): + with self.assertRaises(ValueError): + self.routing.directions(VALID_WAYPOINTS, VALID_PROFILE, route_type=INVALID_ROUTE_TYPE) def test_valid_request(self): route = self.routing.directions(VALID_WAYPOINTS, VALID_PROFILE)