async def test_run_async_oauth_flow_in_progress(
      self, sample_function, credentials_config, mock_tool_context
  ):
    """Test tool behavior when OAuth flow is in progress.

    When credentials aren't available and OAuth flow is needed,
    the tool should return a user-friendly message rather than failing.
    """
    tool = BigQueryTool(
        func=sample_function, credentials_config=credentials_config
    )

    # Mock credentials manager to return None (OAuth flow in progress)
    with patch.object(
        tool._credentials_manager, "get_valid_credentials", return_value=None
    ) as mock_get_creds:

      result = await tool.run_async(
          args={"param1": "test_value"}, tool_context=mock_tool_context
      )

      mock_get_creds.assert_called_once_with(mock_tool_context)
      assert "authorization is required" in result.lower()
      assert tool.name in result
Test tool behavior when OAuth flow is in progress.

    When credentials aren't available and OAuth flow is needed,
    the tool should return a user-friendly message rather than failing.
    
tests/unittests/tools/bigquery/test_bigquery_tool.py