Independent FastAPI backend for the MaskanX agentic growth platform. Includes the agent runtime, MCP client integrations (Meta Ads, LinkedIn, HubSpot, Tavily, Exa, xAI, Citedy, image generation), PostgreSQL storage for chats and cron jobs, provider and secret management, and the CLI. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
28 lines
627 B
Python
28 lines
627 B
Python
# -*- coding: utf-8 -*-
|
|
import pytest
|
|
|
|
from adclaw.agents.react_agent import normalize_reasoning_tool_choice
|
|
|
|
|
|
@pytest.mark.parametrize(
|
|
("tool_choice_in", "has_tools", "expected"),
|
|
[
|
|
(None, True, "auto"),
|
|
(None, False, None),
|
|
("required", True, "required"),
|
|
("none", True, "none"),
|
|
],
|
|
)
|
|
def test_normalize_reasoning_tool_choice(
|
|
tool_choice_in: str | None,
|
|
has_tools: bool,
|
|
expected: str | None,
|
|
) -> None:
|
|
assert (
|
|
normalize_reasoning_tool_choice(
|
|
tool_choice=tool_choice_in,
|
|
has_tools=has_tools,
|
|
)
|
|
== expected
|
|
)
|