mirror of
https://github.com/langgenius/dify.git
synced 2026-09-09 05:41:00 +08:00
This branch inherited two upstream tests that fail because the underlying code paths they cover have changed: - `test_load_agent_soul_for_debug_requires_existing_build_draft` asserts `AgentVersionNotFoundError` is raised when no DEBUG_BUILD row exists. The empty-state fix from #40733 makes that exception unreachable. Renamed to `test_load_agent_soul_for_debug_returns_empty_soul_when_build_draft_missing` and updated to assert the new contract. Also teach `load_agent_soul_for_debug` to handle the empty agent_soul case so pydantic ValidationError doesn't surface to the debug chat. - `test_list_plugins_by_category_falls_back_on_404` reused the same `mock_plugin_entity` for all three entries and mutated `p_model.declaration.category`, mutating all three. Switch to `model_copy(deep=True)` and set the category on each copy explicitly. Also account for the fixture's category validator (auto-assigns Extension when no tool/model/etc. is set), so we override Tool / Model on each copy before the assertion. |
||
|---|---|---|
| .. | ||
| fixtures/workflow | ||
| helpers | ||
| integration_tests | ||
| test_containers_integration_tests | ||
| unit_tests | ||
| __init__.py | ||
| conftest.py | ||
| pytest_dify.py | ||
| seed_legacy_model_type_dirty_data.py | ||
| workflow_test_utils.py | ||