class_docstr: Test UserInfoProxy.
class_docstr_tok: ["Test","UserInfoProxy","."]
docstr: Test that an error is raised when try to assign new value to existing key.
docstr_tok: ["Test","that","an","error","is","raised","when","try","to","assign","new","value","to","existing","key","."]
code: def test_user_cannot_be_modified_existing_key(self):
      """
      Test that an error is raised when try to assign new value to existing key.
      """
      with self.assertRaises(StreamlitAPIException) as e:
          st.experimental_user["email"] = "NEW_VALUE"
  
      self.assertEqual(
          str(e.exception), "st.experimental_user cannot be modified"
      )
  
file_path: streamlit/lib/tests/streamlit/user_info_test.py
imports: import threading
  import streamlit
  from streamlit.errors import StreamlitAPIException
  from streamlit.runtime.forward_msg_queue import ForwardMsgQueue
  from streamlit.runtime.scriptrunner import ScriptRunContext, add_script_run_ctx, get_script_run_ctx
  from streamlit.runtime.state import SafeSessionState, SessionState
  from tests.delta_generator_test_case import DeltaGeneratorTestCase
label_desc: Use image node_id 5 for calling the UserInfoProxyTest obj's underlying member method code with example usage: obj.test_user_cannot_be_modified_existing_key() without return types