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 doesn't belong to a form if its DG was created outside it.
code: def test_dg_outside_form_but_element_inside(self):
      """Test that a widget doesn't belong to a form if its DG was created outside it."""
  
      empty = st.empty()
      with st.form("form"):
          empty.checkbox("widget")
  
      first_delta = self.get_delta_from_queue(0)
      self.assertEqual(
          NO_FORM_ID, first_delta.new_element.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 10 for calling the FormAssociationTest obj's underlying member method code with example usage: obj.test_dg_outside_form_but_element_inside() without return types