code: def test_cli_workspaces_list(
      cli_runner: "CliRunner", cli: "Typer", mocker: "MockerFixture"
  ):
      add_row_spy = mocker.spy(Table, "add_row")
      workspace = WorkspaceSyncFactory.create(name="test_workspace")
      workspace_obj = Workspace.__new__(Workspace)
      workspace_obj.__dict__.update(
          {
              "id": workspace.id,
              "name": workspace.name,
              "inserted_at": workspace.inserted_at,
              "updated_at": workspace.updated_at,
          }
      )
      workspace_list_mock = mocker.patch(
          "argilla.client.workspaces.Workspace.list",
          return_value=[workspace_obj],
      )
  
      result = cli_runner.invoke(cli, "workspaces list")
  
      workspace_list_mock.assert_called_once()
      add_row_spy.assert_called_once_with(
          ANY,  # `self` argument
          str(workspace.id),
          workspace.name,
          workspace.inserted_at.isoformat(sep=" "),
          workspace.updated_at.isoformat(sep=" "),
      )
      assert all(
          col in result.stdout
          for col in (
              "ID",
              "Name",
              "Creation Date",
              "Last Update Date",
              "test_workspace",
          )
      )
      assert result.exit_code == 0
  
file_path: argilla/tests/unit/cli/workspaces/test_list.py
imports: from typing import TYPE_CHECKING
  from unittest.mock import ANY
  import pytest
  from argilla.client.workspaces import Workspace
  from rich.table import Table
  from tests.factories import WorkspaceSyncFactory
label_desc: Use image node_id 1 for calling a global function with example usage: test_cli_workspaces_list(cli_runner, cli, mocker) without return types