class_docstr: Test ability to marshall ChatInput and ChatMessage protos.
class_docstr_tok: ["Test","ability","to","marshall","ChatInput","and","ChatMessage","protos","."]
docstr: Test that it disallows being called in containers (using with syntax).
docstr_tok: ["Test","that","it","disallows","being","called","in","containers","(","using","with","syntax",")","."]
code: def test_session_state_rules(self):
      """Test that it disallows being called in containers (using with syntax)."""
      with pytest.raises(StreamlitAPIException) as exception_message:
          st.session_state.my_key = "Foo"
          st.chat_input("Placeholder", key="my_key")
  
      self.assertEqual(
          SESSION_STATE_WRITES_NOT_ALLOWED_ERROR_TEXT,
          str(exception_message.value),
      )
  
imports: import pytest
  from parameterized import parameterized
  import streamlit
  from streamlit.elements.utils import SESSION_STATE_WRITES_NOT_ALLOWED_ERROR_TEXT
  from streamlit.elements.widgets.chat import DISALLOWED_CONTAINERS_ERROR_TEXT
  from streamlit.errors import StreamlitAPIException
  from streamlit.proto.Block_pb2 import Block
  from streamlit.proto.ChatInput_pb2 import ChatInput
  from tests.delta_generator_test_case import DeltaGeneratorTestCase
label_desc: Use image node_id 15 for calling the ChatTest obj's underlying member method code with example usage: obj.test_session_state_rules() without return types