langflow/src/backend/tests
Gabriel Luiz Freitas Almeida d092724d6a
fix: Fix crashes and enhance test reliability with session IDs (#6683)
* test: Add session ID parameter to ToolCallingAgentComponent test

* test: Add blocking for langchain_core runnables utility function

* test: Add session ID generation to agent component test

* fix: Safely delete agent message with ID check

Modify error handling in LCAgentComponent to only delete agent message if it has an ID attribute, preventing potential attribute errors

* test: Update ComponentToolkit test to use async start and verify results

Modify the test_component_tool_with_api_key test to:
- Use async_start() method for graph execution
- Add session ID to graph
- Improve result verification with vertex result tracking
- Update import path for ChatOutput component

* test: Skip cycle tests requiring LoopComponent

Update test_cycles.py to:
- Add skip markers for tests that now require a LoopComponent
- Improve error message with snapshots for debugging
- Preserve existing test logic while marking as skipped

* test: Add client fixture to tool calling agent test

Add usefixtures decorator to ensure client is available for the tool calling agent test, improving test setup and reliability

* test: Add client fixture to component tool test with API key

Enhance test_component_toolkit.py by adding the client fixture to the test_component_tool_with_api_key method, ensuring proper test setup for API key-dependent scenarios

* test: Add client fixture to agent component test with calculator

Add client fixture to the test_agent_component_with_calculator method to ensure proper test setup for API key-dependent scenarios

* test: Disable redundant component input tests

Remove commented-out test methods for checking required inputs across various components, as these tests were not providing significant value and the inputs are dynamic

* test: Comment out condition to skip nodes with Tool outputs in setup.py

* run formatter

* test: Re-enable condition to skip nodes with Tool outputs in setup.py

* [autofix.ci] apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2025-02-26 19:54:40 +00:00
..
data fix: update documentation links for Custom Component to use the correct URL (#6145) 2025-02-06 22:39:05 +00:00
integration feat: add apify actors integration (#5862) 2025-02-19 19:10:26 +00:00
locust chore: Enhance Locust load testing and optimize database settings (#6265) 2025-02-17 14:26:36 +00:00
performance tests: Remove unnecessary benchmark markers from server init tests (#5806) 2025-01-20 16:43:46 +00:00
unit fix: Fix crashes and enhance test reliability with session IDs (#6683) 2025-02-26 19:54:40 +00:00
.test_durations chore: update test durations (#6778) 2025-02-24 14:01:40 -03:00
__init__.py chore: refactor and add components integration tests (#3607) 2024-09-02 15:21:47 +02:00
api_keys.py ref: Auto-fix ruff rules in tests (#4154) 2024-10-16 15:42:36 +00:00
base.py fix: make sure tests run async (#5842) 2025-01-21 08:16:33 -08:00
conftest.py fix: Fix crashes and enhance test reliability with session IDs (#6683) 2025-02-26 19:54:40 +00:00
constants.py chore: Update supported versions in tests constants (#5569) 2025-01-07 15:43:49 +00:00