code: def test_verify_ria_url():
      # unsupported protocol
      assert_raises(
          ValueError, verify_ria_url, "ria+ftp://localhost/tmp/this", {}
      )
      # bunch of caes that should work
      cases = {
          "ria+file:///tmp/this": (None, "/tmp/this"),
          # no normalization
          "ria+file:///tmp/this/": (None, "/tmp/this/"),
          # with hosts
          "ria+ssh://localhost/tmp/this": (
              "ssh://localhost",
              "/tmp/this",
          ),
          "ria+http://localhost/tmp/this": (
              "http://localhost",
              "/tmp/this",
          ),
          "ria+https://localhost/tmp/this": (
              "https://localhost",
              "/tmp/this",
          ),
          # with username
          "ria+ssh://humbug@localhost/tmp/this": (
              "ssh://humbug@localhost",
              "/tmp/this",
          ),
          # with port
          "ria+ssh://humbug@localhost:2222/tmp/this": (
              "ssh://humbug@localhost:2222",
              "/tmp/this",
          ),
          "ria+ssh://localhost:2200/tmp/this": (
              "ssh://localhost:2200",
              "/tmp/this",
          ),
          # with password
          "ria+https://humbug:1234@localhost:8080/tmp/this": (
              "https://humbug:1234@localhost:8080",
              "/tmp/this",
          ),
          # document a strange (MIH thinks undesirable), but pre-existing
          # behavior an 'ssh example.com' would end up in the user HOME,
          # not in '/'
          "ria+ssh://example.com": ("ssh://example.com", "/"),
      }
      for i, o in cases.items():
          # we are not testing the URL rewriting here
          assert o == verify_ria_url(i, {})[:2]
  
file_path: datalad/datalad/customremotes/tests/test_ria_utils.py
imports: import tempfile
  from os.path import join
  from urllib.parse import quote
  from datalad.customremotes import ria_utils
  from datalad.customremotes.ria_utils import UnknownLayoutVersion, create_ds_in_store, create_store, verify_ria_url
  from datalad.distributed.ora_remote import LocalIO, SSHRemoteIO
  from datalad.tests.utils_pytest import SkipTest, assert_equal, assert_raises, assert_true, rmtree, skip_ssh, with_tempfile
  from datalad.utils import Path, on_windows
label_desc: Use image node_id 5 for calling a global function with example usage: test_verify_ria_url() without return types