コード例 #1
0
ファイル: test_render.py プロジェクト: LeResKP/xmltool
 def test_text_element_to_html(self):
     r = Render()
     obj = type("SubSubCls", (TextElement,), {"tagname": "subsub", "children_classes": []})()
     attrs = [("class", "test")]
     value = "Hello world"
     res = r.text_element_to_html(obj, attrs, value)
     expected = '<textarea class="form-control test">' "Hello world</textarea>"
     self.assertEqual(res, expected)
コード例 #2
0
ファイル: test_render.py プロジェクト: LeResKP/xmltool
 def test_text_element_to_html(self):
     r = Render()
     obj = type('SubSubCls', (TextElement, ),
                {'tagname': 'subsub',
                 'children_classes': []})()
     attrs = [('class', 'test')]
     value = 'Hello world'
     res = r.text_element_to_html(obj, attrs, value)
     expected = ('<textarea class="form-control test">'
                 'Hello world</textarea>')
     self.assertEqual(res, expected)
コード例 #3
0
 def test_text_element_to_html(self):
     r = Render()
     obj = type('SubSubCls', (TextElement, ), {
         'tagname': 'subsub',
         'children_classes': []
     })()
     attrs = [('class', 'test')]
     value = 'Hello world'
     res = r.text_element_to_html(obj, attrs, value)
     expected = ('<textarea class="form-control test">'
                 'Hello world</textarea>')
     self.assertEqual(res, expected)