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)
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)
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)