dify/api/tests/unit_tests/models
Yansong Zhang 971828615e fix: resolve CI failures for Python style, DB migration, and unit tests
- Fix type errors in dify_graph/nodes/agent/agent_node.py:
  - Add missing user_id param to get_agent_tool_runtime call
  - Use create_plugin_provider_manager instead of bare ProviderManager()
  - Pass provider_manager to ModelManager constructor
  - Add access_controller param to file_factory.build_from_mapping
  - Fix return type annotation for _fetch_memory
- Fix DB migration chain: update workflow_comments migration to point
  to correct parent after sandbox migration removal
- Fix test_app_generate_service: set AGENT_V2_TRANSPARENT_UPGRADE=False
  in mock config to prevent transparent upgrade intercepting test flow
- Fix test_app_generator: add scalar method to mock db.session
- Fix test_app_models: add AppMode.AGENT to expected modes set
- Remove unnecessary db.session.close() from agent_chat app_runner

Made-with: Cursor
2026-04-13 15:07:16 +08:00
..
__init__.py feat: Persist Variables for Enhanced Debugging Workflow (#20699) 2025-06-24 09:05:29 +08:00
test_account_models.py test: implement Account/Tenant model integration tests to replace db-mocked unit tests (#34994) 2026-04-13 03:39:16 +00:00
test_account.py remove bare list, dict, Sequence, None, Any (#25058) 2025-09-06 03:32:23 +08:00
test_app_models.py fix: resolve CI failures for Python style, DB migration, and unit tests 2026-04-13 15:07:16 +08:00
test_base.py feat(api): Introduce workflow pause state management (#27298) 2025-10-30 14:41:09 +08:00
test_conversation_variable.py refactor(api): use standalone graphon package (#34209) 2026-03-27 21:05:32 +00:00
test_dataset_models.py fix: external dataset tenant checks for bound knowledge APIs (#34734) 2026-04-13 01:47:57 +00:00
test_enums_creator_user_role.py fix(api): make CreatorUserRole accept both end-user and end_user (#33638) 2026-03-18 14:54:12 +08:00
test_model.py test: migrate Conversation/Message inputs tenant resolution SQL tests to Testcontainers (#34957) 2026-04-11 15:39:30 +00:00
test_plugin_entities.py feat: introduce trigger functionality (#27644) 2025-11-12 17:59:37 +08:00
test_provider_models.py refactor: use EnumText for Provider.quota_type and consolidate ProviderQuotaType (#34299) 2026-03-31 00:29:57 +00:00
test_tool_models.py refactor: use EnumText for ApiToolProvider.schema_type_str and Docume… (#33983) 2026-03-24 13:27:50 +09:00
test_workflow_models.py refactor(api): use standalone graphon package (#34209) 2026-03-27 21:05:32 +00:00
test_workflow_node_execution_offload.py feat: knowledge pipeline (#25360) 2025-09-18 12:49:10 +08:00
test_workflow.py refactor(api): use standalone graphon package (#34209) 2026-03-27 21:05:32 +00:00