code: def test_invalid_call(path=None):
      # no dataset
      assert_raises(
          ValueError, create_sibling_gin, "bogus", dataset=path
      )
      ds = Dataset(path).create()
      # without authorization
      # force disable any configured token
      with patch(
          "datalad.distributed.create_sibling_ghlike.Token", None
      ):
          assert_raises(ValueError, ds.create_sibling_gin, "bogus")
      # unsupported name
      assert_raises(
          ValueError,
          ds.create_sibling_gin,
          "bo  gus",
          credential="some",
      )
  
      # conflicting sibling name
      ds.siblings(
          "add",
          name="gin",
          url="http://example.com",
          result_renderer="disabled",
      )
      res = ds.create_sibling_gin(
          "bogus",
          name="gin",
          credential="some",
          on_failure="ignore",
          dry_run=True,
      )
      assert_status("error", res)
      assert_in_results(
          res,
          status="error",
          message=('already has a configured sibling "%s"', "gin"),
      )
  
file_path: datalad/datalad/distributed/tests/test_create_sibling_ghlike.py
imports: import os
  from os.path import basename
  from unittest.mock import patch
  import requests
  from datalad.api import Dataset, create_sibling_gin
  from datalad.downloaders.http import DEFAULT_USER_AGENT
  from datalad.tests.utils_pytest import SkipTest, assert_in, assert_in_results, assert_raises, assert_result_count, assert_status, eq_, with_tempfile
label_desc: Use image node_id 1 for calling a global function with example usage: test_invalid_call(path) without return types