You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gpustack/tests/utils/test_utils.py

14 lines
428 B

from gpustack.utils.network import normalize_route_path
def test_normalize_route_path():
assert (
normalize_route_path("/api/v1") == "/api/v1"
), "Failed on already correct path"
assert normalize_route_path("api/v1") == "/api/v1", "Failed to add leading slash"
assert normalize_route_path("") == "/", "Failed on empty string input"
assert normalize_route_path("/") == "/", "Failed on root path"