class_docstr: Test the MITIFF Writer class.
docstr: Test saving if mitiff missing palette.
docstr_tok: ["Test","saving","if","mitiff","missing","palette","."]
code: def test_save_dataset_with_missing_palette(self):
      """Test saving if mitiff missing palette."""
      import sys
  
      from satpy.writers.mitiff import MITIFFWriter
  
      stream_handler = logging.StreamHandler(sys.stdout)
      logger.addHandler(stream_handler)
      logger.setLevel(logging.DEBUG)
  
      dataset = self._get_test_one_dataset()
      pal_desc = ["test", "test2"]
      unit = "Test"
      palette = {
          "palette": True,
          "palette_description": pal_desc,
          "palette_unit": unit,
          "palette_channel_name": dataset.attrs["name"],
      }
      w = MITIFFWriter(base_dir=self.base_dir)
      tiffinfo = {}
      tiffinfo[270] = "Just dummy image desc".encode("utf-8")
      filename = "{:s}_{:%Y%m%d_%H%M%S}.mitiff".format(
          dataset.attrs["name"], dataset.attrs["start_time"]
      )
      try:
          with self.assertLogs(logger, logging.ERROR) as lc:
              w._save_as_palette(
                  dataset.compute(),
                  os.path.join(self.base_dir, filename),
                  tiffinfo,
                  **palette,
              )
          for _op in lc.output:
              assert (
                  "In a mitiff palette image a color map must be provided: palette_color_map is missing."
                  in _op
              )
      finally:
          logger.removeHandler(stream_handler)
  
imports: import logging
  import os
  import unittest
  import numpy
  from PIL import Image
label_desc: Use image node_id 30 for calling the TestMITIFFWriter obj's underlying member method code with example usage: obj.test_save_dataset_with_missing_palette() without return types