mirror of
https://github.com/willmiao/ComfyUI-Lora-Manager.git
synced 2026-10-09 02:52:12 -03:00
fix(civitai): anchor model-page URL parsing and improve missing-model diagnostics (#1140)
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
import pytest
|
||||
|
||||
from py.utils.civitai_utils import (
|
||||
build_license_flags,
|
||||
extract_civitai_image_id,
|
||||
@@ -8,6 +10,13 @@ from py.utils.civitai_utils import (
|
||||
resolve_license_payload,
|
||||
)
|
||||
|
||||
@pytest.mark.parametrize("host", ["civitai.com", "civitai.red"])
|
||||
@pytest.mark.parametrize("path", ["/api/download/models/3390681", "/api/v1/models/3390681", "/models/3390681invalid"])
|
||||
def test_extract_civitai_model_url_parts_rejects_non_model_pages(host, path):
|
||||
assert extract_civitai_model_url_parts(
|
||||
f"https://{host}{path}?modelVersionId=3390681"
|
||||
) == (None, None)
|
||||
|
||||
|
||||
def test_resolve_license_payload_defaults():
|
||||
payload, flags = resolve_license_info({})
|
||||
|
||||
Reference in New Issue
Block a user