class_docstr: The ninjo tiff writer tests.
class_docstr_tok: ["The","ninjo","tiff","writer","tests","."]
docstr: Test saving an image.
docstr_tok: ["Test","saving","an","image","."]
code: def test_image(self, iwsi, save_dataset):
      """Test saving an image."""
      nt = pyninjotiff_mock.ninjotiff
      nt.reset_mock()
      from satpy.writers.ninjotiff import NinjoTIFFWriter
  
      ntw = NinjoTIFFWriter()
      dataset = xr.DataArray([1, 2, 3], attrs={"units": "K"})
      img = FakeImage(dataset, "L")
      ret = ntw.save_image(img, filename="bla.tif", compute=False)
      nt.save.assert_called()
      assert nt.save.mock_calls[0][2]["compute"] is False
      assert (
          nt.save.mock_calls[0][2]["ch_min_measurement_unit"]
          < nt.save.mock_calls[0][2]["ch_max_measurement_unit"]
      )
      assert ret == nt.save.return_value
  
file_path: satpy/satpy/tests/writer_tests/test_ninjotiff.py
imports: import sys
  import unittest
  from unittest import mock
  import numpy
  import pytest
  import xarray
label_desc: Use image node_id 4 for calling the TestNinjoTIFFWriter obj's underlying member method code with example usage: obj.test_image(iwsi, save_dataset) without return types