langflow/src/backend/tests/integration/flows/test_basic_prompting.py
Deepankar Mahapatro 5734735e2d
test: add pyleak for task and event loop block detections (#8802)
* test: add pyleak for task and event loop block detections

* test: add pyleak for task and event loop block detections

* ci: add env variables for verbose logging

* chore: dummy sleep to shwocase error

* chore: dummy sleep to showcase error

* chore: remove dummy sleep
2025-07-01 13:07:25 +00:00

20 lines
884 B
Python

from langflow.components.input_output import ChatInput, ChatOutput
from langflow.components.processing import PromptComponent
from langflow.graph import Graph
from langflow.schema.message import Message
from tests.integration.utils import pyleak_marker, run_flow
@pyleak_marker()
async def test_simple_no_llm():
graph = Graph()
flow_input = graph.add_component(ChatInput())
flow_output = graph.add_component(ChatOutput())
component = PromptComponent(template="This is the message: {var1}", var1="")
prompt = graph.add_component(component)
graph.add_component_edge(flow_input, ("message", "var1"), prompt)
graph.add_component_edge(prompt, ("prompt", "input_value"), flow_output)
outputs = await run_flow(graph, run_input="hello!")
assert isinstance(outputs["message"], Message)
assert outputs["message"].text == "This is the message: hello!"