class_docstr: Test basic data downloading functionality.
class_docstr_tok: ["Test","basic","data","downloading","functionality","."]
docstr: Test that tests aren't allowed to download stuff.
docstr_tok: ["Test","that","tests","are","n't","allowed","to","download","stuff","."]
code: def test_no_downloads_in_tests(self):
      """Test that tests aren't allowed to download stuff."""
      import satpy
      from satpy.aux_download import register_file, retrieve
  
      file_registry = {}
      with satpy.config.set(
          config_path=[self.tmpdir],
          data_dir=str(self.tmpdir),
          download_aux=True,
      ), mock.patch("satpy.aux_download._FILE_REGISTRY", file_registry):
          cache_key = "myfile.rst"
          register_file(README_URL, cache_key)
          assert not self.tmpdir.join(cache_key).exists()
          pytest.raises(RuntimeError, retrieve, cache_key)
          # touch the file so it gets created
          open(self.tmpdir.join(cache_key), "w").close()
          # offline downloading should still be allowed
          with satpy.config.set(download_aux=False):
              retrieve(cache_key)
  
imports: from unittest import mock
  import pytest
  import yaml
  from satpy.aux_download import DataDownloadMixin
  from satpy.modifiers import ModifierBase
label_desc: Use image node_id 8 for calling the TestDataDownload obj's underlying member method code with example usage: obj.test_no_downloads_in_tests() without return types