async def test_debug_normal_error(self, mock_model_response):
        """Test debug tool with normal error description."""
        tool = DebugIssueTool()

        with patch.object(tool, "create_model") as mock_create_model:
            mock_model = MagicMock()
            mock_model.generate_content.return_value = mock_model_response(
                "Root cause: The variable is undefined. Fix: Initialize it..."
            )
            mock_create_model.return_value = mock_model

            result = await tool.execute(
                {
                    "error_description": "TypeError: Cannot read property 'name' of undefined",
                    "error_context": "at line 42 in user.js\n  console.log(user.name)",
                    "runtime_info": "Node.js v16.14.0",
                }
            )

            assert len(result) == 1
            output = json.loads(result[0].text)
            assert output["status"] == "success"
            assert "Debug Analysis" in output["content"]
            assert "Root cause" in output["content"]
Test debug tool with normal error description.
tests/test_prompt_regression.py