コード例 #1
0
    def __test_add_form_handlers(self, create_form=False):
        """
        Test of adding multiple form handlers. At this point form
        should be created.
        """
        if create_form:
            # Adding a form first
            self.__test_add_form()

        # One by one adding form elements with data.
        # Example follows:
        #
        # self.__add_form_element(
        #    force_text(BooleanSelectPlugin.name),
        #    {
        #        'label': "Test boolean",
        #        'name': "test_boolean",
        #        'help_text': "Lorem ipsum boolean",
        #        'required': False,
        #    }
        #    )

        for plugin_name, plugin_data in TEST_FORM_HANDLER_PLUGIN_DATA.items():
            # Add form element to the form
            self.__add_form_handler(plugin_name, plugin_data)
コード例 #2
0
    def __test_add_form_handlers(self, create_form=False):
        """
        Test of adding multiple form handlers. At this point form
        should be created.
        """
        if create_form:
            # Adding a form first
            self.__test_add_form()

        # One by one adding form elements with data.
        # Example follows:
        #
        #self.__add_form_element(
        #    force_text(BooleanSelectPlugin.name),
        #    {
        #        'label': "Test boolean",
        #        'name': "test_boolean",
        #        'help_text': "Lorem ipsum boolean",
        #        'required': False,
        #    }
        #    )

        for plugin_name, plugin_data in TEST_FORM_HANDLER_PLUGIN_DATA.items():
            # Add form element to the form
            self.__add_form_handler(plugin_name, plugin_data)
コード例 #3
0
 def __test_remove_form_handlers(self):
     """
     Test of removing multiple form handlers. At this point form
     should be created.
     """
     for plugin_name, plugin_data in TEST_FORM_HANDLER_PLUGIN_DATA.items():
         # Remove form handler from the form
         self.__remove_form_handler(plugin_name, plugin_data)
コード例 #4
0
 def __test_remove_form_handlers(self):
     """
     Test of removing multiple form handlers. At this point form
     should be created.
     """
     for plugin_name, plugin_data in TEST_FORM_HANDLER_PLUGIN_DATA.items():
         # Remove form handler from the form
         self.__remove_form_handler(plugin_name, plugin_data)