from starlette.routing import Route

from starlette_proxy_router.parser import Parser
from starlette_proxy_router.routing import create_routes
from tests.constants import PATH_FILE_CONFIG


def test_create_routes() -> None:
    parser = Parser(PATH_FILE_CONFIG)
    endpoints_args = parser.parse_configs()
    routes = create_routes(endpoints_args)
    assert isinstance(routes[0], Route) is True
    assert routes[0].path == "/api/v1/proxy"
