test: provide a tensor to watermark upload guard test

This commit is contained in:
xuyucai
2026-10-29 11:31:01 +08:00
parent ce12ca45ac
commit bc5a032164
+2 -1
View File
@@ -2,6 +2,7 @@ import os
from unittest.mock import patch
import pytest
import torch
from src.Comfyui_Fd_Nodes.nodes import FD_RemoveWatermark
@@ -12,6 +13,6 @@ def test_watermark_url_only_upload_failure_does_not_send_or_return_original():
with patch("requests.post") as post:
with pytest.raises(RuntimeError, match="URL request failed: upload failed"):
FD_RemoveWatermark().remove_watermark(
None, "http://model/v1/process", "", 0.3, 0.35, 3000, 9, 2, "lama", True, True, 95
torch.zeros((1, 2, 2, 3)), "http://model/v1/process", "", 0.3, 0.35, 3000, 9, 2, "lama", True, True, 95
)
post.assert_not_called()