mirror of
https://github.com/willmiao/ComfyUI-Lora-Manager.git
synced 2026-09-25 21:14:09 -03:00
feat: support reverse-proxy URL subpaths (llama-swap, SwarmUI) (#1122)
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
"""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
|
||||
Reference in New Issue
Block a user