class_docstr: Tests for every flavor of form/deltagenerator association.
class_docstr_tok: ["Tests","for","every","flavor","of","form\/deltagenerator","association","."]
docstr: Test that a widget can be created directly on a form block.
code: def test_widget_created_directly_on_form_block(self):
      """Test that a widget can be created directly on a form block."""
  
      form = st.form("form")
      form.checkbox("widget")
  
      self.assertEqual("form", self._get_last_checkbox_form_id())
  
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 7 for calling the FormAssociationTest obj's underlying member method code with example usage: obj.test_widget_created_directly_on_form_block() without return types