code: def test_remote_default_cmd(dvc):
      remote = "mys3"
      ret = main(["remote", "add", "mys3", "s3://bucket/path"])
      assert ret == 0
  
      ret = main(["remote", "default", "mys3"])
      assert ret == 0
      config_file = os.path.join(dvc.dvc_dir, Config.CONFIG)
      config = configobj.ConfigObj(config_file)
      default = config["core"]["remote"]
      assert default == remote
  
      ret = main(["remote", "default", "--unset"])
      assert ret == 0
      config = configobj.ConfigObj(config_file)
      default = config.get("core", {}).get("remote")
      assert default is None
  
imports: import errno
  import itertools
  import os
  import stat
  import configobj
  import pytest
  from dvc.cli import main
  from dvc.config import Config
  from dvc.exceptions import DownloadError, UploadError
  from dvc.utils.fs import remove
label_desc: Use image node_id 7 for calling a global function with example usage: test_remote_default_cmd(dvc) without return types