code: def test_get_contentlocation(tdir=None):
      repo = AnnexRepo(tdir, create=True, init=True)
      repo.add("file.dat")
      repo.commit("added file.dat")
  
      # TODO contentlocation would come with eval_availability=True
      key = repo.get_file_annexinfo("file.dat")["key"]
      cr = ArchiveAnnexCustomRemote(None, path=tdir)
      key_path = cr.get_contentlocation(key, absolute=False)
      assert not isabs(key_path)
      key_path_abs = cr.get_contentlocation(key, absolute=True)
      assert isabs(key_path_abs)
      assert cr._contentlocations == {key: key_path}
      repo.drop("file.dat", options=["--force"])
      assert not cr.get_contentlocation(key, absolute=True)
  
file_path: datalad/datalad/customremotes/tests/test_base.py
imports: from os.path import isabs
  import pytest
  from datalad.api import Dataset, clone
  from datalad.consts import DATALAD_SPECIAL_REMOTE
  from datalad.support.annexrepo import AnnexRepo
  from datalad.tests.utils_pytest import assert_false, assert_in, assert_not_in, assert_raises, known_failure_githubci_win, with_tempfile, with_tree
  from datalad.utils import Path
  from ..archives import ArchiveAnnexCustomRemote
  from ..base import ensure_datalad_remote, init_datalad_remote
label_desc: Use image node_id 1 for calling a global function with example usage: test_get_contentlocation(tdir) without return types