📝 (tests/conftest.py): Remove duplicate imports and organize imports for better readability
♻️ (tests/test_custom_component.py): Refactor CustomComponent to Component for better naming consistency ♻️ (tests/test_endpoints.py): Refactor test functions to improve readability and maintainability by simplifying assertions and organizing code
This commit is contained in:
parent
433ea80ab6
commit
e4f4401d75
3 changed files with 23 additions and 16 deletions
|
|
@ -4,7 +4,7 @@ from uuid import uuid4
|
|||
|
||||
import pytest
|
||||
from langchain_core.documents import Document
|
||||
from langflow.custom import CustomComponent
|
||||
from langflow.custom import CustomComponent, Component
|
||||
from langflow.custom.code_parser.code_parser import CodeParser, CodeSyntaxError
|
||||
from langflow.custom.custom_component.base_component import BaseComponent, ComponentCodeNullError
|
||||
from langflow.custom.utils import build_custom_component_template
|
||||
|
|
@ -15,7 +15,7 @@ from langflow.services.database.models.flow import Flow, FlowCreate
|
|||
def code_component_with_multiple_outputs():
|
||||
with open("tests/data/component_multiple_outputs.py", "r") as f:
|
||||
code = f.read()
|
||||
return CustomComponent(code=code)
|
||||
return Component(code=code)
|
||||
|
||||
|
||||
code_default = """
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue