fix(backend): address CodeQL false positive - use full URL in test assertion

Use the complete URL variable instead of a substring to avoid CodeQL's
"Incomplete URL substring sanitization" alert in test code.
This commit is contained in:
Zamil Majdy
2026-03-26 16:25:28 +07:00
parent c9f45f056a
commit ac947a0c11

View File

@@ -521,7 +521,8 @@ def test_build_mcp_simulation_prompt_contains_tool_info():
system_prompt, user_prompt = _build_mcp_simulation_prompt(input_data)
assert "get_weather" in system_prompt
assert "mcp.example.com" in system_prompt
# Verify the full server URL is included (not just a substring)
assert input_data["server_url"] in system_prompt
assert '"city"' in system_prompt # schema
assert "London" in user_prompt # arguments