dify/api/tests/unit_tests/core
EvanYao826 d03d958d49 fix: stop auth header prefix accumulating on repeated Custom Tool calls
When a Custom Tool uses API Key authentication with a Bearer or Basic
prefix, assembling_request mutated runtime.credentials in-place,
prepending the prefix to api_key_value on every call. Subsequent
invocations would read the already-prefixed value and prefix it again,
producing headers like "Bearer Bearer Bearer token".

Use a local variable instead of writing back to the shared credentials
dict, so the stored value is never modified.

Fixes #35974
2026-05-10 21:33:57 +08:00
..
agent chore: add Type to test (#35942) 2026-05-09 03:16:22 +00:00
app chore: api para type (#35985) 2026-05-10 06:04:42 +00:00
base chore: add Type to test (#35942) 2026-05-09 03:16:22 +00:00
callback_handler chore: add Type to test (#35942) 2026-05-09 03:16:22 +00:00
datasource chore: add Type to test (#35942) 2026-05-09 03:16:22 +00:00
entities chore(api): upgrade graphon to v0.3.0 (#35469) 2026-05-09 07:30:03 +00:00
extension chore: add Type to test (#35942) 2026-05-09 03:16:22 +00:00
external_data_tool test: add type to test (#35871) 2026-05-08 01:06:25 +00:00
file chore(api): adapt Graphon 0.2.2 upgrade (#35377) 2026-04-18 11:16:24 +00:00
helper chore(api): upgrade graphon to v0.3.0 (#35469) 2026-05-09 07:30:03 +00:00
llm_generator chore: fix use select style api in orm (#35531) 2026-04-24 08:35:20 +00:00
logging test: added for core logging and core mcp (#32478) 2026-03-12 11:44:56 +08:00
mcp fix: prevent double /v1 in MCP server URL causing 404 authorization failure (#34596) 2026-04-20 02:42:59 +00:00
memory chore: reorg imports (#35308) 2026-04-16 08:50:02 +00:00
model_runtime chore(api): upgrade graphon to v0.3.0 (#35469) 2026-05-09 07:30:03 +00:00
moderation refactor: replace bare dict with dict[str, Any] in enterprise telemetry, external data tool, and moderation tests (#35185) 2026-04-14 17:51:02 +00:00
ops chore: add Type to test (#35942) 2026-05-09 03:16:22 +00:00
plugin chore(api): upgrade graphon to v0.3.0 (#35469) 2026-05-09 07:30:03 +00:00
prompt chore: add Type to test (#35942) 2026-05-09 03:16:22 +00:00
rag fix: Image rendering in the knowledge base failed. (#35914) 2026-05-09 10:06:01 +00:00
repositories chore(api): adapt Graphon 0.2.2 upgrade (#35377) 2026-04-18 11:16:24 +00:00
schemas test: added for core module moderation, repositories, schemas (#32514) 2026-03-22 23:57:12 +08:00
telemetry chore: add Type to test (#35942) 2026-05-09 03:16:22 +00:00
tools fix: stop auth header prefix accumulating on repeated Custom Tool calls 2026-05-10 21:33:57 +08:00
trigger chore: reorg imports (#35308) 2026-04-16 08:50:02 +00:00
variables chore: add Type to test (#35942) 2026-05-09 03:16:22 +00:00
workflow chore(api): upgrade graphon to v0.3.0 (#35469) 2026-05-09 07:30:03 +00:00
__init__.py FEAT: NEW WORKFLOW ENGINE (#3160) 2024-04-08 18:51:46 +08:00
test_file.py chore(api): adapt Graphon 0.2.2 upgrade (#35377) 2026-04-18 11:16:24 +00:00
test_model_manager.py fix: sync 35528 (#35539) 2026-04-24 03:59:33 +00:00
test_provider_configuration.py chore: reorg imports (#35308) 2026-04-16 08:50:02 +00:00
test_provider_manager.py chore(api): upgrade graphon to v0.3.0 (#35469) 2026-05-09 07:30:03 +00:00
test_trigger_debug_event_selectors.py refactor(api): move workflow knowledge nodes and trigger nodes (#33445) 2026-03-15 15:24:59 +08:00