class_docstr: Test VIIRS SDR downloading.
class_docstr_tok: ["Test","VIIRS","SDR","downloading","."]
docstr: Test re-downloading VIIRS SDR data.
docstr_tok: ["Test","re-downloading","VIIRS","SDR","data","."]
code: def test_do_not_download_the_files_twice(self, requests, tmpdir):
      """Test re-downloading VIIRS SDR data."""
      from satpy.demo import get_viirs_sdr_20170128_1229
  
      get_mock = mock.MagicMock()
      requests.get.return_value.__enter__ = get_mock
      with mock_filesystem():
          files = get_viirs_sdr_20170128_1229(base_dir=str(tmpdir))
          new_files = get_viirs_sdr_20170128_1229(base_dir=str(tmpdir))
  
      total_num_files = 10 * (
          16 + 5 + 1 + 3
      )  # 10 granules * (5 I bands + 16 M bands + 1 DNB + 3 geolocation)
      assert len(new_files) == total_num_files
      assert get_mock.call_count == total_num_files
      assert new_files == files
  
imports: from __future__ import annotations
  import contextlib
  import io
  import os
  import sys
  import tarfile
  import unittest
  from collections import defaultdict
  from unittest import mock
  import pytest
label_desc: Use image node_id 2 for calling the TestVIIRSSDRDemoDownload obj's underlying member method code with example usage: obj.test_do_not_download_the_files_twice(requests, tmpdir) without return types