class_docstr: Test ability to marshall form protos.
class_docstr_tok: ["Test","ability","to","marshall","form","protos","."]
docstr: Test that buttons are not allowed in forms.
code: def test_button_in_form(self):
      """Test that buttons are not allowed in forms."""
  
      with self.assertRaises(StreamlitAPIException) as ctx:
          with st.form("foo"):
              st.button("foo")
  
      self.assertIn(
          "`st.button()` can't be used in an `st.form()`",
          str(ctx.exception),
      )
  
imports: from unittest.mock import MagicMock, patch
  import streamlit
  from streamlit.errors import StreamlitAPIException
  from streamlit.runtime.state.session_state import RegisterWidgetResult
  from tests.delta_generator_test_case import DeltaGeneratorTestCase
label_desc: Use image node_id 6 for calling the FormMarshallingTest obj's underlying member method code with example usage: obj.test_button_in_form() without return types