class_docstr: Test various olci_nc filehandlers.
class_docstr_tok: ["Test","various","olci_nc","filehandlers","."]
docstr: Test initialization of file handlers.
docstr_tok: ["Test","initialization","of","file","handlers","."]
code: def test_instantiate(self, mocked_dataset):
      """Test initialization of file handlers."""
      import xarray as xr
  
      from satpy.readers.olci_nc import (
          NCOLCI1B,
          NCOLCI2,
          NCOLCIBase,
          NCOLCICal,
          NCOLCIChannelBase,
          NCOLCIGeo,
      )
      from satpy.tests.utils import make_dataid
  
      cal_data = xr.Dataset(
          {
              "solar_flux": (("bands"), [0, 1, 2]),
              "detector_index": (("bands"), [0, 1, 2]),
          },
          {
              "bands": [0, 1, 2],
          },
      )
  
      ds_id = make_dataid(name="Oa01", calibration="reflectance")
      ds_id2 = make_dataid(name="wsqf", calibration="reflectance")
      filename_info = {
          "mission_id": "S3A",
          "dataset_name": "Oa01",
          "start_time": 0,
          "end_time": 0,
      }
  
      test = NCOLCIBase("somedir/somefile.nc", filename_info, "c")
      test.get_dataset(ds_id, filename_info)
      mocked_dataset.assert_called()
      mocked_dataset.reset_mock()
  
      test = NCOLCICal("somedir/somefile.nc", filename_info, "c")
      test.get_dataset(ds_id, filename_info)
      mocked_dataset.assert_called()
      mocked_dataset.reset_mock()
  
      test = NCOLCIGeo("somedir/somefile.nc", filename_info, "c")
      test.get_dataset(ds_id, filename_info)
      mocked_dataset.assert_called()
      mocked_dataset.reset_mock()
  
      test = NCOLCIChannelBase(
          "somedir/somefile.nc", filename_info, "c"
      )
      test.get_dataset(ds_id, filename_info)
      mocked_dataset.assert_called()
      mocked_dataset.reset_mock()
  
      cal = mock.Mock()
      cal.nc = cal_data
      test = NCOLCI1B("somedir/somefile.nc", filename_info, "c", cal)
      test.get_dataset(ds_id, filename_info)
      mocked_dataset.assert_called()
      mocked_dataset.reset_mock()
  
      test = NCOLCI2("somedir/somefile.nc", filename_info, "c")
      test.get_dataset(ds_id, {"nc_key": "the_key"})
      test.get_dataset(ds_id2, {"nc_key": "the_key"})
      mocked_dataset.assert_called()
      mocked_dataset.reset_mock()
  
file_path: satpy/satpy/tests/reader_tests/test_olci_nc.py
imports: import datetime
  import unittest
  import unittest.mock
label_desc: Use image node_id 1 for calling the TestOLCIReader obj's underlying member method code with example usage: obj.test_instantiate(mocked_dataset) without return types