class_docstr: Test the filehandler.
class_docstr_tok: ["Test","the","filehandler","."]
docstr: Test getting the sensor name.
docstr_tok: ["Test","getting","the","sensor","name","."]
code: def test_sensor_name(self):
      """Test getting the sensor name."""
      with tempfile.TemporaryFile() as tmpfile:
          self._header.tofile(tmpfile)
          tmpfile.seek(HEADER_LENGTH, 0)
          self._data.tofile(tmpfile)
  
          fh_ = MHS_AMSUB_AAPPL1CFile(
              tmpfile, self.filename_info, self.filetype_info
          )
  
      assert fh_.sensor == "mhs"
  
      self._header["instrument"][0] = 11
      with tempfile.TemporaryFile() as tmpfile:
          self._header.tofile(tmpfile)
          tmpfile.seek(HEADER_LENGTH, 0)
          self._data.tofile(tmpfile)
  
          fh_ = MHS_AMSUB_AAPPL1CFile(
              tmpfile, self.filename_info, self.filetype_info
          )
  
      assert fh_.sensor == "amsub"
  
      self._header["instrument"][0] = 10
  
      with tempfile.TemporaryFile() as tmpfile:
          self._header.tofile(tmpfile)
          tmpfile.seek(HEADER_LENGTH, 0)
          self._data.tofile(tmpfile)
  
          with pytest.raises(
              IOError, match="Sensor neither MHS nor AMSU-B!"
          ):
              fh_ = MHS_AMSUB_AAPPL1CFile(
                  tmpfile, self.filename_info, self.filetype_info
              )
  
file_path: satpy/satpy/tests/reader_tests/test_aapp_mhs_amsub_l1c.py
imports: import datetime
  import tempfile
  import unittest
  import numpy
  import pytest
  from satpy.readers.aapp_mhs_amsub_l1c import _HEADERTYPE, _SCANTYPE, HEADER_LENGTH, MHS_AMSUB_AAPPL1CFile
  from satpy.tests.utils import make_dataid
label_desc: Use image node_id 3 for calling the TestMHS_AMSUB_AAPPL1CReadData obj's underlying member method code with example usage: obj.test_sensor_name() without return types