Commit 41e202d5 authored by Nicolas Delaby's avatar Nicolas Delaby

test render_odt_variable for CheckBoxField

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@41468 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 57f03a02
......@@ -415,6 +415,16 @@ class TestCheckBoxField(ERP5TypeTestCase):
self.field.render_odt(as_string=False, REQUEST=self.portal.REQUEST).tag)
self.assertEquals('1', self.field.render_odt(as_string=False, REQUEST=self.portal.REQUEST).text)
def test_render_odt_variable(self):
for value in (True, False,):
self.field.values['default'] = value
node = self.field.render_odt_variable(as_string=False)
self.assertEquals(node.get('{%s}value-type' % NSMAP['office']),
'boolean')
self.assertEquals(node.get('{%s}boolean-value' % NSMAP['office']),
str(value).lower())
self.assertEquals(node.text, str(value).upper())
class TestListField(ERP5TypeTestCase):
"""Tests List field
"""
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment