dify/api/tests/unit_tests
QuantumGhost 501d3b6203
feat(api): Explicitly define version method for all BaseNode subclasses (#21443)
This PR addresses issue #21441 by implementing explicit `version` method definitions for all `BaseNode` subclasses to improve code maintainability.

### Changes

Added explicit `version` method definitions for all `BaseNode` subclasses:

- `QuestionClassifierNode`
- `KnowledgeRetrievalNode` 
- `AgentNode`

Added comprehensive test suite to validate:

1. All subclasses of `BaseNode` have explicitly defined `version` method
2. All subclasses have required `_node_type` property
3. The `(node_type, node_version)` combination is unique across all subclasses
2025-06-24 20:27:22 +08:00
..
configs fix(config): Allow DB_EXTRAS to set search_path via options (#19560) 2025-05-13 10:10:18 +08:00
controllers feat: Persist Variables for Enhanced Debugging Workflow (#20699) 2025-06-24 09:05:29 +08:00
core feat(api): Explicitly define version method for all BaseNode subclasses (#21443) 2025-06-24 20:27:22 +08:00
extensions feat: add debug log for request and response (#19781) (#19783) 2025-05-17 17:31:09 +08:00
factories feat: Persist Variables for Enhanced Debugging Workflow (#20699) 2025-06-24 09:05:29 +08:00
libs feat: Persist Variables for Enhanced Debugging Workflow (#20699) 2025-06-24 09:05:29 +08:00
models feat: Persist Variables for Enhanced Debugging Workflow (#20699) 2025-06-24 09:05:29 +08:00
oss chore(lint): correct allowed-unused-imports settings for cleanup unused imports in tests (#11922) 2024-12-28 01:19:31 +08:00
repositories refactor(workflow): Rename workflow node execution models (#20458) 2025-05-30 04:56:37 +08:00
services feat: Persist Variables for Enhanced Debugging Workflow (#20699) 2025-06-24 09:05:29 +08:00
utils feat: add interfaces of OAuth handler methods for authorization (#18889) 2025-04-27 16:00:37 +08:00
.gitignore Enhance Code Consistency Across Repository with `.editorconfig` (#19023) 2025-04-29 18:04:33 +08:00
__init__.py FEAT: NEW WORKFLOW ENGINE (#3160) 2024-04-08 18:51:46 +08:00
conftest.py Feature:Refactor batch update document status for #21324 (#21325) 2025-06-23 09:49:13 +08:00