class_docstr: Test ability to marshall text_input protos.
class_docstr_tok: ["Test","ability","to","marshall","text_input","protos","."]
code: def test_input_types(self):
      # Test valid input types.
      type_strings = ["default", "password"]
      type_values = [TextInput.DEFAULT, TextInput.PASSWORD]
      for type_string, type_value in zip(type_strings, type_values):
          st.text_input("label", type=type_string)
  
          c = self.get_delta_from_queue().new_element.text_input
          self.assertEqual(type_value, c.type)
  
      # An invalid input type should raise an exception.
      with self.assertRaises(StreamlitAPIException) as exc:
          st.text_input("label", type="bad_type")
  
      self.assertEqual(
          "'bad_type' is not a valid text_input type. "
          "Valid types are 'default' and 'password'.",
          str(exc.exception),
      )
  
imports: import re
  from unittest.mock import MagicMock, patch
  from parameterized import parameterized
  import streamlit
  from streamlit.errors import StreamlitAPIException
  from streamlit.proto.LabelVisibilityMessage_pb2 import LabelVisibilityMessage
  from streamlit.proto.TextInput_pb2 import TextInput
  from streamlit.testing.v1.app_test import AppTest
  from tests.delta_generator_test_case import DeltaGeneratorTestCase
label_desc: Use image node_id 5 for calling the TextInputTest obj's underlying member method code with example usage: obj.test_input_types() without return types