def test_toElementRequired(self):
        field = data_form.Field(var='test', required=True)
        element = field.toElement(True)

        self.assertEqual(1, len(element.children))
        child = element.children[0]
        self.assertEqual('required', child.name)
        self.assertEqual(NS_X_DATA, child.uri)
Test rendering to a DOM with options.
dataset/ETHPy150Open ralphm/wokkel/wokkel/test/test_data_form.py/FieldTest.test_toElementRequired