Commit 37cad69c authored by Nicolas Delaby's avatar Nicolas Delaby

test render_odt for IntegerField


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@40518 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 9743b0bc
......@@ -41,7 +41,7 @@ from Products.Formulator.FieldRegistry import FieldRegistry
from Products.Formulator.Validator import ValidationError
from Products.Formulator.StandardFields import FloatField, StringField,\
DateTimeField, TextAreaField, CheckBoxField, ListField, LinesField, \
MultiListField
MultiListField, IntegerField
from Products.Formulator.MethodField import Method, BoundMethod
from Products.Formulator.TALESField import TALESMethod
......@@ -230,6 +230,22 @@ class TestFloatField(ERP5TypeTestCase):
.xpath('%s/text()' % ODG_XML_WRAPPING_XPATH, namespaces=NSMAP)[0]
self.assertEquals('1 000.0', test_value)
class TestIntegerField(ERP5TypeTestCase):
"""Tests integer field
"""
def getTitle(self):
return "Integer Field"
def afterSetUp(self):
self.field = IntegerField('test_field')
self.widget = self.field.widget
def test_render_odt(self):
self.field.values['default'] = 34
self.assertEquals('34', self.field.render_odt(as_string=False).text)
class TestStringField(ERP5TypeTestCase):
"""Tests string field
"""
......@@ -882,6 +898,7 @@ def test_suite():
suite = unittest.TestSuite()
suite.addTest(unittest.makeSuite(TestRenderViewAPI))
suite.addTest(unittest.makeSuite(TestFloatField))
suite.addTest(unittest.makeSuite(TestIntegerField))
suite.addTest(unittest.makeSuite(TestStringField))
suite.addTest(unittest.makeSuite(TestDateTimeField))
suite.addTest(unittest.makeSuite(TestTextAreaField))
......
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