class_docstr: Unit tests for InMemoryCacheStorageWrapper
class_docstr_tok: ["Unit","tests","for","InMemoryCacheStorageWrapper"]
docstr: Test that storage.get() returns the value from persist storage
  if value doesn't exist in memory.
docstr_tok: ["Test","that","storage.get","(",")","returns","the","value","from","persist","storage","if","value","does","n't","exist","in","memory","."]
code: def test_in_memory_cache_storage_wrapper_get_key_in_persist_storage(
      self,
  ):
      """
      Test that storage.get() returns the value from persist storage
      if value doesn't exist in memory.
      """
  
      context = self.get_storage_context()
      persist_storage = LocalDiskCacheStorage(context)
      wrapped_storage = InMemoryCacheStorageWrapper(
          persist_storage=persist_storage, context=context
      )
  
      persist_storage.set("some-key", b"some-value")
      with patch.object(
          persist_storage, "get", wraps=persist_storage.get
      ) as mock_persist_get:
          self.assertEqual(
              wrapped_storage.get("some-key"), b"some-value"
          )
          mock_persist_get.assert_called_once_with("some-key")
  
          # Call get again to make that underlying storage is not called again
          self.assertEqual(
              wrapped_storage.get("some-key"), b"some-value"
          )
          mock_persist_get.assert_called_once()
  
file_path: streamlit/lib/tests/streamlit/runtime/caching/storage/in_memory_cache_storage_wrapper_test.py
imports: import unittest
  from unittest.mock import patch
  from testfixtures import TempDirectory
  from streamlit.runtime.caching.storage import CacheStorageContext, CacheStorageKeyNotFoundError
  from streamlit.runtime.caching.storage.dummy_cache_storage import DummyCacheStorage
  from streamlit.runtime.caching.storage.in_memory_cache_storage_wrapper import InMemoryCacheStorageWrapper
  from streamlit.runtime.caching.storage.local_disk_cache_storage import LocalDiskCacheStorage
label_desc: Use image node_id 6 for calling the InMemoryCacheStorageWrapperTest obj's underlying member method code with example usage: obj.test_in_memory_cache_storage_wrapper_get_key_in_persist_storage() without return types