class_docstr: Test GRIB Reader.
class_docstr_tok: ["Test","GRIB","Reader","."]
docstr: Check that the grib reader handles missing attributes in the grib file.
docstr_tok: ["Check","that","the","grib","reader","handles","missing","attributes","in","the","grib","file","."]
code: def test_missing_attributes(
      self, proj_params, lon_corners, lat_corners
  ):
      """Check that the grib reader handles missing attributes in the grib file."""
      fake_pygrib = self._get_fake_pygrib(
          proj_params, lon_corners, lat_corners
      )
  
      # This has modelName
      query_contains = DataQuery(name="t", level=100, modifiers=tuple())
      # This does not have modelName
      query_not_contains = DataQuery(
          name="t", level=300, modifiers=tuple()
      )
      dataset = self._get_test_datasets(
          [query_contains, query_not_contains], fake_pygrib
      )
      assert dataset[query_contains].attrs["modelName"] == "notknown"
      assert dataset[query_not_contains].attrs["modelName"] == "unknown"
  
imports: import os
  import sys
  from unittest import mock
  import numpy
  import pytest
  import xarray
  from satpy.dataset import DataQuery
label_desc: Use image node_id 9 for calling the TestGRIBReader obj's underlying member method code with example usage: obj.test_missing_attributes(proj_params, lon_corners, lat_corners) without return types