Add test for route type verification
This commit is contained in:
parent
0ec1e051be
commit
98a4ed81c5
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user