code: def test_set_and_unset_git_credential(self) -> None:
      username = "hf_test_user_" + str(
          round(time.time())
      )  # make username unique
  
      # Set credentials
      set_git_credential(
          token="hf_test_token",
          username=username,
          folder=self.cache_dir,
      )
  
      # Check credentials are stored
      with run_interactive_subprocess(
          "git credential fill", folder=self.cache_dir
      ) as (stdin, stdout):
          stdin.write(f"url={ENDPOINT}\nusername={username}\n\n")
          stdin.flush()
          output = stdout.read()
      self.assertIn("password=hf_test_token", output)
  
      # Unset credentials
      unset_git_credential(username=username, folder=self.cache_dir)
  
      # Check credentials are NOT stored
      # Cannot check with `git credential fill` as it would hang forever: only
      # checking `store` helper instead.
      with run_interactive_subprocess(
          "git credential-store get", folder=self.cache_dir
      ) as (stdin, stdout):
          stdin.write(f"url={ENDPOINT}\nusername={username}\n\n")
          stdin.flush()
          output = stdout.read()
      self.assertEqual("", output)
  
file_path: huggingface_hub/tests/test_utils_git_credentials.py
imports: import time
  import unittest
  from pathlib import Path
  import pytest
  from huggingface_hub.constants import ENDPOINT
  from huggingface_hub.utils import run_interactive_subprocess, run_subprocess
  from huggingface_hub.utils._git_credential import _parse_credential_output, list_credential_helpers, set_git_credential, unset_git_credential
label_desc: Use image node_id 3 for calling the TestGitCredentials obj's underlying member method code with example usage: obj.test_set_and_unset_git_credential() without return types