dify/api/tests/unit_tests
GareArc 41af72449d
fix: address PR review feedback on enterprise license enforcement
- Cache invalid license statuses with 30s TTL to prevent DoS amplification
- Return LicenseStatus enum (not raw str) from get_cached_license_status
- Flatten nested try/except into _read_cached_license_status / _fetch_and_cache_license_status helpers
- Escalate log levels from debug to warning with exc_info for cache failures
- Switch before_request license check from fail-open to fail-closed
- Remove dead raise_for_status parameter from BaseRequest.send_request
- Gate license expired_at behind is_authenticated; only expose status to unauthenticated callers (CVE-2025-63387)
- Remove redundant 'not is_console_api' guard in before_request
- Add 8 unit tests for get_cached_license_status
2026-03-08 17:00:12 -07:00
..
commands fix(api): make DB migration Redis lock TTL configurable and prevent LockNotOwnedError from masking failures (#32299) 2026-02-14 14:55:05 +08:00
configs feat: Human Input Node (#32060) 2026-02-09 14:57:23 +08:00
controllers refactor(api): move model_runtime into dify_graph (#32858) 2026-03-02 20:15:32 +08:00
core feat: add files to message end pr32019 (#32242) 2026-03-07 20:01:12 +08:00
extensions feat: Human Input Node (#32060) 2026-02-09 14:57:23 +08:00
factories refactor: move workflow package to dify_graph (#32844) 2026-03-02 18:42:30 +08:00
fields refactor: port api/fields/file_fields.py (#30638) 2026-01-06 22:55:58 +08:00
libs feat: support redis xstream (#32586) 2026-03-04 13:18:55 +08:00
models refactor: move workflow package to dify_graph (#32844) 2026-03-02 18:42:30 +08:00
oss test(api): add autospec to MagicMock-based patch usage (#32752) 2026-03-01 04:30:45 +08:00
repositories refactor(api): move model_runtime into dify_graph (#32858) 2026-03-02 20:15:32 +08:00
services fix: address PR review feedback on enterprise license enforcement 2026-03-08 17:00:12 -07:00
tasks feat(tasks): isolate summary generation to dedicated dataset_summary queue (#32972) 2026-03-06 14:35:28 +08:00
tools refactor(api): move model_runtime into dify_graph (#32858) 2026-03-02 20:15:32 +08:00
utils refactor(api): move model_runtime into dify_graph (#32858) 2026-03-02 20:15:32 +08:00
__init__.py FEAT: NEW WORKFLOW ENGINE (#3160) 2024-04-08 18:51:46 +08:00
.gitignore Enhance Code Consistency Across Repository with .editorconfig (#19023) 2025-04-29 18:04:33 +08:00
conftest.py fix(api): fix the issue that workflow_runs.started_at is overwritten while resuming (#32851) 2026-03-06 15:41:30 +08:00