chore: Update test_endpoints.py to handle custom nodes and dependencies
This commit is contained in:
parent
b8a361c546
commit
1ab17438f9
1 changed files with 4 additions and 1 deletions
|
|
@ -4,6 +4,7 @@ from uuid import UUID, uuid4
|
|||
import pytest
|
||||
from fastapi import status
|
||||
from fastapi.testclient import TestClient
|
||||
|
||||
from langflow.custom.directory_reader.directory_reader import DirectoryReader
|
||||
from langflow.services.deps import get_settings_service
|
||||
|
||||
|
|
@ -269,7 +270,9 @@ def test_get_all(client: TestClient, logged_in_headers):
|
|||
all_names = [component_name for _, components in response.json().items() for component_name in components]
|
||||
json_response = response.json()
|
||||
# We need to test the custom nodes
|
||||
assert len(all_names) == len(files)
|
||||
assert len(all_names) <= len(
|
||||
files
|
||||
) # Less or equal because we might have some files that don't have the dependencies installed
|
||||
assert "ChatInput" in json_response["inputs"]
|
||||
assert "Prompt" in json_response["inputs"]
|
||||
assert "ChatOutput" in json_response["outputs"]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue