Skip to content

Commit

Permalink
feat: Add unit test for ChatInput to Tool conversion.
Browse files Browse the repository at this point in the history
  • Loading branch information
ogabrielluiz committed Aug 18, 2024
1 parent 7406fe1 commit 0f2532a
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions src/backend/tests/unit/custom/component/test_component_to_tool.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import pytest

from langflow.components.inputs.ChatInput import ChatInput


@pytest.fixture
def client():
pass


def test_component_to_tool():
chat_input = ChatInput()
tool = chat_input.to_tool()
assert tool.name == "ChatInput"
assert tool.description == "Get chat inputs from the Playground."
assert tool.component._id == chat_input._id

0 comments on commit 0f2532a

Please sign in to comment.