class_docstr: Swap in HDF4 file handler.
class_docstr_tok: ["Swap","in","HDF4","file","handler","."]
docstr: Mimic reader input file content.
docstr_tok: ["Mimic","reader","input","file","content","."]
code: def get_test_content(self, filename, filename_info, filename_type):
      """Mimic reader input file content."""
      file_content = {}
      file_content["/attr/Satellitename"] = filename_info[
          "platform_shortname"
      ]
      file_content["/attr/SensorIdentifyCode"] = "VIIRS"
  
      # only one dataset for the flood reader
      file_content["WaterDetection"] = DEFAULT_FILE_DATA
      file_content["WaterDetection/attr/_Fillvalue"] = 1
      file_content["WaterDetection/attr/scale_factor"] = 1.0
      file_content["WaterDetection/attr/add_offset"] = 0.0
      file_content["WaterDetection/attr/units"] = "none"
      file_content["WaterDetection/shape"] = DEFAULT_FILE_SHAPE
      file_content["WaterDetection/attr/ProjectionMinLatitude"] = 15.0
      file_content["WaterDetection/attr/ProjectionMaxLatitude"] = 68.0
      file_content[
          "WaterDetection/attr/ProjectionMinLongitude"
      ] = -124.0
      file_content["WaterDetection/attr/ProjectionMaxLongitude"] = -61.0
  
      # convert tp xarrays
      from xarray import DataArray
  
      for key, val in file_content.items():
          if isinstance(val, np.ndarray):
              attrs = {}
              for a in [
                  "_Fillvalue",
                  "units",
                  "ProjectionMinLatitude",
                  "ProjectionMaxLongitude",
                  "ProjectionMinLongitude",
                  "ProjectionMaxLatitude",
              ]:
                  if key + "/attr/" + a in file_content:
                      attrs[a] = file_content[key + "/attr/" + a]
              if val.ndim > 1:
                  file_content[key] = DataArray(
                      val, dims=("fakeDim0", "fakeDim1"), attrs=attrs
                  )
              else:
                  file_content[key] = DataArray(val, attrs=attrs)
  
      if "y" not in file_content["WaterDetection"].dims:
          file_content["WaterDetection"] = file_content[
              "WaterDetection"
          ].rename({"fakeDim0": "x", "fakeDim1": "y"})
      return file_content
  
file_path: satpy/satpy/tests/reader_tests/test_viirs_edr_flood.py
imports: import os
  import unittest
  from unittest import mock
  import numpy
  from satpy.tests.reader_tests.test_hdf4_utils import FakeHDF4FileHandler
label_desc: Use image node_id 1 for calling the FakeHDF4FileHandler2 obj's underlying member method code with example usage: obj.get_test_content(filename, filename_info, filename_type) and returns: file_content