langflow/src/backend/tests
anovazzi1 0cf4f03400
fix: Improve error handling in aupdate_messages function to prevent empty message error (#5655)
* refactor: Improve error handling in aupdate_messages function

* Update src/backend/base/langflow/memory.py

Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>

* fix(tests): updating a non-existing message adds a new message now

- Updated the test name from `test_aupdate_nonexistent_message` to `test_aupdate_nonexistent_message_generates_a_new_message` for better clarity.
- Modified the assertion to expect that a new message is generated when attempting to update a nonexistent message, changing the expected length of the updated messages from 0 to 1.

* [autofix.ci] apply automated fixes

* fix(tests): update message handling in tests for non-existent messages

- Refactored tests to ensure that attempting to update a non-existent message raises a ValueError instead of creating a new message.
- Updated test names and assertions for clarity and accuracy, ensuring they reflect the expected behavior when handling messages that do not exist in the database.

---------

Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2025-01-20 16:21:19 +00:00
..
data refactor: add graph utility tests and refactor sorting methods (#5538) 2025-01-09 20:15:24 +00:00
integration ref: Some ruff fixes from preview (#5420) 2024-12-28 21:25:35 +00:00
locust ref: Bump ruff version to 0.8 (#5087) 2024-12-08 11:16:06 +00:00
performance feat: Bump ruff version to 0.9 (#5666) 2025-01-15 15:14:43 +00:00
unit fix: Improve error handling in aupdate_messages function to prevent empty message error (#5655) 2025-01-20 16:21:19 +00:00
.test_durations chore: update test durations (#5799) 2025-01-20 15:54:25 +00: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 tests: allow tests to skip version tests if file_names_mapping is empty (#5562) 2025-01-07 12:47:14 +00:00
conftest.py tests: fix tests by clearing service_manager services (#5573) 2025-01-08 13:13:41 +00:00
constants.py chore: Update supported versions in tests constants (#5569) 2025-01-07 15:43:49 +00:00