Skip to content

Commit 86d3421

Browse files
committed
refactor(api): Remove unused method
1 parent 69a1acb commit 86d3421

File tree

3 files changed

+1
-29
lines changed

3 files changed

+1
-29
lines changed

api/core/workflow/nodes/human_input/entities.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -80,10 +80,6 @@ def replace_url_placeholder(cls, body: str, url: str | None) -> str:
8080
"""Replace the url placeholder with provided value."""
8181
return body.replace(cls.URL_PLACEHOLDER, url or "")
8282

83-
def body_with_url(self, url: str | None) -> str:
84-
"""Return body content with url placeholder replaced."""
85-
return self.render_body_template(body=self.body, url=url)
86-
8783
@classmethod
8884
def render_body_template(
8985
cls,

api/tests/unit_tests/core/app/apps/test_workflow_pause_events.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
import pytest
66

7-
import core.app.apps.common.workflow_response_converter as workflow_response_converter
7+
from core.app.apps.common import workflow_response_converter
88
from core.app.apps.common.workflow_response_converter import WorkflowResponseConverter
99
from core.app.apps.workflow.app_runner import WorkflowAppRunner
1010
from core.app.entities.app_invoke_entities import InvokeFrom

api/tests/unit_tests/core/workflow/nodes/human_input/test_email_delivery_config.py

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -2,30 +2,6 @@
22
from core.workflow.runtime import VariablePool
33

44

5-
def test_replace_url_placeholder_with_value():
6-
config = EmailDeliveryConfig(
7-
recipients=EmailRecipients(),
8-
subject="Subject",
9-
body="Click here {{#url#}} to open.",
10-
)
11-
12-
result = config.body_with_url("https://example.com/link")
13-
14-
assert result == "Click here https://example.com/link to open."
15-
16-
17-
def test_replace_url_placeholder_missing_value():
18-
config = EmailDeliveryConfig(
19-
recipients=EmailRecipients(),
20-
subject="Subject",
21-
body="No link {{#url#}} available.",
22-
)
23-
24-
result = config.body_with_url(None)
25-
26-
assert result == "No link available."
27-
28-
295
def test_render_body_template_replaces_variable_values():
306
config = EmailDeliveryConfig(
317
recipients=EmailRecipients(),

0 commit comments

Comments
 (0)