code: def test_cli_add(create_test_dir, capsys):
      chkpt0 = "checkpoint_0.pt"
      cli.main(["add", "--no_per_tensor", chkpt0])
  
      sha1_store = SHA1_Store(
          Path.cwd().joinpath(".wgit", "sha1_store"),
          init=False,
      )
      sha1_hash = sha1_store._get_sha1_hash(chkpt0)
      with open(
          os.path.join(".wgit", "wgit_testing/checkpoint_0.pt"), "r"
      ) as f:
          json_data = json.load(f)
  
      sha1_dir_0 = f"{sha1_hash[:2]}/" + f"{sha1_hash[2:]}"
      # The sha1 are different because add internally use a different pickle method.
      assert json_data["SHA1"] != sha1_hash
  
file_path: fairscale/tests/experimental/wgit/test_cli.py
imports: import json
  import os
  from pathlib import Path
  import shutil
  import pytest
  import torch
  from torch import nn
  import fairscale.experimental.wgit.cli
  from fairscale.experimental.wgit.sha1_store import SHA1_Store
label_desc: Use image node_id 3 for calling a global function with example usage: test_cli_add(create_test_dir, capsys) without return types