Mercurial > p > roundup > code
comparison test/test_templating.py @ 5485:b0359a7c5b6d
create input elements with attributes in a defined (sorted) order
| author | Christof Meerwald <cmeerw@cmeerw.org> |
|---|---|
| date | Thu, 02 Aug 2018 20:56:01 +0100 |
| parents | 3fa026621f69 |
| children | 52cb53eedf77 |
comparison
equal
deleted
inserted
replaced
| 5484:ca8050fa5e78 | 5485:b0359a7c5b6d |
|---|---|
| 210 | 210 |
| 211 self.assertEqual(p.hyperlinked(), 'A string <b> with <a href="mailto:rouilj@example.com">rouilj@example.com</a> embedded &lt; html</b>') | 211 self.assertEqual(p.hyperlinked(), 'A string <b> with <a href="mailto:rouilj@example.com">rouilj@example.com</a> embedded &lt; html</b>') |
| 212 | 212 |
| 213 def test_string_field(self): | 213 def test_string_field(self): |
| 214 p = StringHTMLProperty(self.client, 'test', '1', None, 'test', 'A string <b> with rouilj@example.com embedded < html</b>') | 214 p = StringHTMLProperty(self.client, 'test', '1', None, 'test', 'A string <b> with rouilj@example.com embedded < html</b>') |
| 215 self.assertEqual(p.field(), '<input type="text" name="test1@test" value="A string <b> with rouilj@example.com embedded &lt; html</b>" size="30">') | 215 self.assertEqual(p.field(), '<input name="test1@test" size="30" type="text" value="A string <b> with rouilj@example.com embedded &lt; html</b>">') |
| 216 | 216 |
| 217 def test_string_multiline(self): | 217 def test_string_multiline(self): |
| 218 p = StringHTMLProperty(self.client, 'test', '1', None, 'test', 'A string <b> with rouilj@example.com embedded < html</b>') | 218 p = StringHTMLProperty(self.client, 'test', '1', None, 'test', 'A string <b> with rouilj@example.com embedded < html</b>') |
| 219 self.assertEqual(p.multiline(), '<textarea name="test1@test" id="test1@test" rows="5" cols="40">A string <b> with rouilj@example.com embedded &lt; html</b></textarea>') | 219 self.assertEqual(p.multiline(), '<textarea name="test1@test" id="test1@test" rows="5" cols="40">A string <b> with rouilj@example.com embedded &lt; html</b></textarea>') |
| 220 self.assertEqual(p.multiline(rows=300, cols=100, **{'class':'css_class'}), '<textarea class="css_class" name="test1@test" id="test1@test" rows="300" cols="100">A string <b> with rouilj@example.com embedded &lt; html</b></textarea>') | 220 self.assertEqual(p.multiline(rows=300, cols=100, **{'class':'css_class'}), '<textarea class="css_class" name="test1@test" id="test1@test" rows="300" cols="100">A string <b> with rouilj@example.com embedded &lt; html</b></textarea>') |
