class_docstr: Test ability to marshall ChatInput and ChatMessage protos.
class_docstr_tok: ["Test","ability","to","marshall","ChatInput","and","ChatMessage","protos","."]
docstr: Test that chat_message throws an StreamlitAPIException on invalid avatar input.
docstr_tok: ["Test","that","chat_message","throws","an","StreamlitAPIException","on","invalid","avatar","input","."]
code: def test_throws_invalid_avatar_exception(self):
      """Test that chat_message throws an StreamlitAPIException on invalid avatar input."""
      with pytest.raises(StreamlitAPIException):
          st.chat_message("user", avatar="FOOO")
  
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 9 for calling the ChatTest obj's underlying member method code with example usage: obj.test_throws_invalid_avatar_exception() without return types