class_docstr: Test HSAF Reader.
class_docstr_tok: ["Test","HSAF","Reader","."]
docstr: Test reading the actual datasets from a grib file.
docstr_tok: ["Test","reading","the","actual","datasets","from","a","grib","file","."]
code: def test_get_dataset(self, pg):
      """Test reading the actual datasets from a grib file."""
      pg.open.return_value = FakeGRIB()
      from satpy.readers.hsaf_grib import HSAFFileHandler
  
      # Instantaneous precipitation
      fh = HSAFFileHandler(
          "filename", mock.MagicMock(), mock.MagicMock()
      )
      fh.filename = "H03B"
      ds_id = make_dataid(name="H03B")
      data = fh.get_dataset(ds_id, mock.Mock())
      np.testing.assert_array_equal(
          data.values, np.arange(25.0).reshape((5, 5))
      )
  
      # Accumulated precipitation
      fh = HSAFFileHandler(
          "filename", mock.MagicMock(), mock.MagicMock()
      )
      fh.filename = "H05B"
      ds_id = make_dataid(name="H05B")
      data = fh.get_dataset(ds_id, mock.Mock())
      np.testing.assert_array_equal(
          data.values, np.arange(25.0).reshape((5, 5))
      )
  
imports: import sys
  import unittest
  from datetime import datetime
  from unittest import mock
  import numpy
  from pytest import approx
  from satpy.tests.utils import make_dataid
label_desc: Use image node_id 5 for calling the TestHSAFFileHandler obj's underlying member method code with example usage: obj.test_get_dataset(pg) without return types