import random
import logging


def get_random_route(rs_api) -> int:
    """Gets a random route id used for testing"""
    routes = rs_api.get_routes()
    index = random.randint(1, len(routes) - 1)
    route_id = routes[index]['RouteID']
    logging.getLogger().info("Selecting RouteID %s", route_id)
    return route_id