mirror of
https://github.com/willmiao/ComfyUI-Lora-Manager.git
synced 2026-09-24 12:34:09 -03:00
24 lines
570 B
Python
24 lines
570 B
Python
"""Tests for py/utils/url_utils.py relative_root_prefix."""
|
|
|
|
from __future__ import annotations
|
|
|
|
import pytest
|
|
|
|
from py.utils.url_utils import relative_root_prefix
|
|
|
|
|
|
@pytest.mark.parametrize(
|
|
("request_path", "expected"),
|
|
[
|
|
("/", ""),
|
|
("/loras", ""),
|
|
("/checkpoints", ""),
|
|
("/statistics", ""),
|
|
("/loras/", ""),
|
|
("/loras/recipes", "../"),
|
|
("/loras/recipes/", "../"),
|
|
],
|
|
)
|
|
def test_relative_root_prefix(request_path: str, expected: str) -> None:
|
|
assert relative_root_prefix(request_path) == expected
|