From bc5a032164d4989ecf8dc633dfd217873d1d6820 Mon Sep 17 00:00:00 2001 From: xuyucai Date: Thu, 29 Oct 2026 11:31:01 +0800 Subject: [PATCH] test: provide a tensor to watermark upload guard test --- tests/test_watermark_url_only.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/test_watermark_url_only.py b/tests/test_watermark_url_only.py index e4f1792..33f961d 100644 --- a/tests/test_watermark_url_only.py +++ b/tests/test_watermark_url_only.py @@ -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()