class_docstr: Test the scene class.
class_docstr_tok: ["Test","the","scene","class","."]
docstr: Test getting storage options from reader kwargs.
  
  Case where each reader have their own storage options and there are
  global options to merge.
docstr_tok: ["Test","getting","storage","options","from","reader","kwargs",".","Case","where","each","reader","have","their","own","storage","options","and","there","are","global","options","to","merge","."]
code: def test_storage_options_from_reader_kwargs_per_reader_and_global(
      self,
  ):
      """Test getting storage options from reader kwargs.
  
      Case where each reader have their own storage options and there are
      global options to merge.
      """
      filenames = {
          "reader1": ["s3://data-bucket/file1"],
          "reader2": ["s3://data-bucket/file2"],
          "reader3": ["s3://data-bucket/file3"],
      }
      reader_kwargs = {
          "reader1": {
              "reader_opt_1": "foo",
              "storage_options": {"option1": "1"},
          },
          "reader2": {
              "reader_opt_2": "bar",
              "storage_options": {"option2": "2"},
          },
          "storage_options": {"endpoint_url": "url"},
      }
      orig_reader_kwargs = deepcopy(reader_kwargs)
  
      with mock.patch("satpy.scene.load_readers"):
          with mock.patch("fsspec.open_files") as open_files:
              Scene(filenames=filenames, reader_kwargs=reader_kwargs)
              assert (
                  mock.call(
                      filenames["reader1"],
                      option1="1",
                      endpoint_url="url",
                  )
                  in open_files.mock_calls
              )
              assert (
                  mock.call(
                      filenames["reader2"],
                      option2="2",
                      endpoint_url="url",
                  )
                  in open_files.mock_calls
              )
              assert reader_kwargs == orig_reader_kwargs
  
imports: import os
  import random
  import string
  from copy import deepcopy
  from unittest import mock
  import pytest
  import satpy
  from satpy import Scene
  from satpy.tests.utils import FAKE_FILEHANDLER_END, FAKE_FILEHANDLER_START, spy_decorator
label_desc: Use image node_id 17 for calling the TestScene obj's underlying member method code with example usage: obj.test_storage_options_from_reader_kwargs_per_reader_and_global() without return types