class_docstr: Swap-in NetCDF4 File Handler.
class_docstr_tok: ["Swap-in","NetCDF4","File","Handler","."]
docstr: Mimic reader input file content for lower resolution files.
docstr_tok: ["Mimic","reader","input","file","content","for","lower","resolution","files","."]
code: def get_test_content(self, filename, filename_info, filetype_info):
      """Mimic reader input file content for lower resolution files."""
      dt_s = filename_info.get("start_time", DEFAULT_DATE)
      dt_e = filename_info.get("end_time", DEFAULT_DATE)
  
      if filetype_info["file_type"] == "mimicTPW2_comp":
          file_content = {
              "/attr/start_time": dt_s.strftime("%Y%m%d.%H%M%S"),
              "/attr/end_time": dt_e.strftime("%Y%m%d.%H%M%S"),
              "/attr/platform_shortname": "aggregated microwave",
              "/attr/sensor": "mimic",
          }
          file_content["latArr"] = DEFAULT_LAT
          file_content["latArr/shape"] = (DEFAULT_FILE_SHAPE[0],)
          file_content["latArr/attr/units"] = "degress_north"
  
          file_content["lonArr"] = DEFAULT_LON
          file_content["lonArr/shape"] = (DEFAULT_FILE_SHAPE[1],)
          file_content["lonArr/attr/units"] = "degrees_east"
  
          file_content["/dimension/lat"] = DEFAULT_FILE_SHAPE[0]
          file_content["/dimension/lon"] = DEFAULT_FILE_SHAPE[1]
  
          for float_var in float_variables:
              file_content[float_var] = DEFAULT_FILE_FLOAT_DATA.reshape(
                  DEFAULT_FILE_SHAPE
              )
              file_content[
                  "{}/shape".format(float_var)
              ] = DEFAULT_FILE_SHAPE
              file_content_attr[float_var] = {"units": "mm"}
          for date_var in date_variables:
              file_content[date_var] = DEFAULT_FILE_DATE_DATA.reshape(
                  DEFAULT_FILE_SHAPE
              )
              file_content[
                  "{}/shape".format(date_var)
              ] = DEFAULT_FILE_SHAPE
              file_content_attr[date_var] = {"units": "minutes"}
          for ubyte_var in ubyte_variables:
              file_content[ubyte_var] = DEFAULT_FILE_UBYTE_DATA.reshape(
                  DEFAULT_FILE_SHAPE
              )
              file_content[
                  "{}/shape".format(ubyte_var)
              ] = DEFAULT_FILE_SHAPE
              file_content_attr[ubyte_var] = {
                  "source_key": "Key: 0: None, 1: NOAA-N, 2: NOAA-P, 3: Metop-A, \
                                                                4: Metop-B, 5: SNPP, 6: SSMI-17, 7: SSMI-18"
              }
  
          # convert to xarrays
          for key, val in file_content.items():
              if key == "lonArr" or key == "latArr":
                  file_content[key] = xr.DataArray(val)
              elif isinstance(val, np.ndarray):
                  if val.ndim > 1:
                      file_content[key] = xr.DataArray(
                          val,
                          dims=("y", "x"),
                          attrs=file_content_attr[key],
                      )
                  else:
                      file_content[key] = xr.DataArray(val)
          for key in itertools.chain(float_variables, ubyte_variables):
              file_content[key].attrs["_FillValue"] = -999.0
              file_content[key].attrs["name"] = key
              file_content[key].attrs["file_key"] = key
              file_content[key].attrs["file_type"] = self.filetype_info[
                  "file_type"
              ]
      else:
          msg = "Wrong Test Reader for file_type {}".format(
              filetype_info["file_type"]
          )
          raise AssertionError(msg)
  
      return file_content
  
file_path: satpy/satpy/tests/reader_tests/test_mimic_TPW2_lowres.py
imports: import itertools
  import os
  import unittest
  from datetime import datetime
  from unittest import mock
  import numpy
  import xarray
  from satpy.tests.reader_tests.test_netcdf_utils import FakeNetCDF4FileHandler
label_desc: Use image node_id 1 for calling the FakeNetCDF4FileHandlerMimicLow obj's underlying member method code with example usage: obj.get_test_content(filename, filename_info, filetype_info) and returns: file_content