class_docstr: To run: "python -m saliency.core.occlusion_test" from top-level saliency directory.
class_docstr_tok: ["To","run",":","``","python","-m","saliency.core.occlusion_test","''","from","top-level","saliency","directory","."]
docstr: Tests the call_model_function receives the correct inputs.
docstr_tok: ["Tests","the","call_model_function","receives","the","correct","inputs","."]
code: def testOcclusionCallModelArgs(self):
      """Tests the call_model_function receives the correct inputs."""
      img = np.ones([INPUT_HEIGHT_WIDTH, INPUT_HEIGHT_WIDTH])
      expected_keys = [occlusion.OUTPUT_LAYER_VALUES]
      call_model_args = {"foo": "bar"}
      mock_call_model = mock.MagicMock(
          return_value={occlusion.OUTPUT_LAYER_VALUES: [3]}
      )
  
      self.occlusion_instance.GetMask(
          img,
          call_model_function=mock_call_model,
          call_model_args=call_model_args,
          size=3,
          value=0,
      )
      calls = mock_call_model.mock_calls
  
      self.assertEqual(len(calls), 10)
      for call in calls:
          kwargs = call[2]
          self.assertEqual(
              kwargs["call_model_args"],
              call_model_args,
              msg="function was called with incorrect call_model_args.",
          )
          self.assertEqual(
              kwargs["expected_keys"],
              expected_keys,
              msg="function was called with incorrect expected_keys.",
          )
  
file_path: saliency/saliency/core/occlusion_test.py
imports: import unittest
  import unittest.mock
  from .base import OUTPUT_LAYER_VALUES
  from .base import SHAPE_ERROR_MESSAGE
  from .None import occlusion
  import numpy
label_desc: Use image node_id 3 for calling the OcclusionTest obj's underlying member method code with example usage: obj.testOcclusionCallModelArgs() without return types