docstr: Test that we override dunder methods.
docstr_tok: ["Test","that","we","override","dunder","methods","."]
code: def test_deprecate_obj_name(self, mock_show_warning: Mock):
      """Test that we override dunder methods."""
  
      class DictClass(dict):
          pass
  
      beta_dict = deprecate_obj_name(
          DictClass(), "beta_dict", "my_dict", "1980-01-01"
      )
  
      beta_dict["foo"] = "bar"
      self.assertEqual(beta_dict["foo"], "bar")
      self.assertEqual(len(beta_dict), 1)
      self.assertEqual(list(beta_dict), ["foo"])
  
      expected_warning = (
          "Please replace `st.beta_dict` with `st.my_dict`.\n\n"
          "`st.beta_dict` will be removed after 1980-01-01."
      )
  
      # We only show the warning a single time for a given object.
      mock_show_warning.assert_called_once_with(expected_warning)
  
file_path: streamlit/lib/tests/streamlit/deprecation_util_test.py
imports: import unittest
  from unittest.mock import Mock, patch
  from streamlit.deprecation_util import deprecate_func_name, deprecate_obj_name, show_deprecation_warning
  from tests.testutil import patch_config_options
label_desc: Use image node_id 4 for calling the DeprecationUtilTest obj's underlying member method code with example usage: obj.test_deprecate_obj_name(mock_show_warning) without return types