code: def test_get_url_requires_dvc(tmp_dir, scm):
      tmp_dir.scm_gen({"foo": "foo"}, commit="initial")
  
      with pytest.raises(OutputNotFoundError, match="output 'foo'"):
          api.get_url("foo", repo=os.fspath(tmp_dir))
  
      with pytest.raises(OutputNotFoundError, match="output 'foo'"):
          api.get_url("foo", repo=f"file://{tmp_dir.as_posix()}")
  
imports: import os
  import pytest
  from funcy import first, get_in
  from dvc import api
  from dvc.exceptions import OutputNotFoundError, PathMissingError
  from dvc.testing.api_tests import TestAPI
  from dvc.testing.tmp_dir import make_subrepo
  from dvc.utils.fs import remove
label_desc: Use image node_id 2 for calling a global function with example usage: test_get_url_requires_dvc(tmp_dir, scm) without return types