* add first astra integ test framework * use fixtures * remove old tests from merge * Add correct sender type * chore: Update unit test command in GitHub workflow --------- Co-authored-by: ogabrielluiz <gabriel@langflow.org>
15 lines
435 B
Python
15 lines
435 B
Python
from langflow.components import experimental
|
|
|
|
|
|
def test_python_function_component():
|
|
# Arrange
|
|
python_function_component = experimental.PythonFunctionComponent()
|
|
|
|
# Act
|
|
# function must be a string representation
|
|
function = "def function():\n return 'Hello, World!'"
|
|
# result is the callable function
|
|
result = python_function_component.build(function)
|
|
|
|
# Assert
|
|
assert result() == "Hello, World!"
|