dify/api/tests
Taranum01 af78fd77ef fix: address post-rebase test breakages on this branch
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.
2026-08-15 03:01:28 +05:30
..
fixtures/workflow chore(api): Upgrade graphon to v0.5.1 (#37168) 2026-06-11 07:37:27 +00:00
helpers chore: port isinstance to match case (#37271) 2026-06-18 00:18:03 +00:00
integration_tests refactor(api): consolidate deployment edition handling (#40142) 2026-08-11 07:39:01 +00:00
test_containers_integration_tests fix: reclaim conversation resources on deletion (#40792) 2026-08-14 14:30:04 +00:00
unit_tests fix: address post-rebase test breakages on this branch 2026-08-15 03:01:28 +05:30
__init__.py refactor: move vdb implementations to workspaces (#34900) 2026-04-13 08:56:43 +00:00
conftest.py refactor(workflow-file): move core.file to core.workflow.file (#32252) 2026-02-16 22:38:19 +08:00
pytest_dify.py test(api): manage backend pytest services natively (#36235) 2026-05-19 07:52:15 +00:00
seed_legacy_model_type_dirty_data.py feat(api): introduce model-type migration script (#36520) 2026-05-27 02:12:11 +00:00
workflow_test_utils.py chore: reorg imports (#35308) 2026-04-16 08:50:02 +00:00