Commit 05fd2b93 authored by Ivan Tyagov's avatar Ivan Tyagov

Use current year to prevent form validation errors due to an year out of...

Use current year to prevent form validation errors due to an year out of current form's year selection index.
parent e3cf85c9
...@@ -4,7 +4,7 @@ import unittest ...@@ -4,7 +4,7 @@ import unittest
from Products.Formulator.Form import ZMIForm from Products.Formulator.Form import ZMIForm
from Products.Formulator.XMLToForm import XMLToForm from Products.Formulator.XMLToForm import XMLToForm
from Products.Formulator.FormToXML import formToXML from Products.Formulator.FormToXML import formToXML
from DateTime import DateTime
from Products.Formulator.Errors import ValidationError, FormValidationError from Products.Formulator.Errors import ValidationError, FormValidationError
from Testing import ZopeTestCase from Testing import ZopeTestCase
ZopeTestCase.installProduct('Formulator') ZopeTestCase.installProduct('Formulator')
...@@ -388,7 +388,7 @@ class SerializeTestCase(unittest.TestCase): ...@@ -388,7 +388,7 @@ class SerializeTestCase(unittest.TestCase):
request['field_float_field'] = '2.71828' request['field_float_field'] = '2.71828'
request['subfield_field_date_field_month'] = '11' request['subfield_field_date_field_month'] = '11'
request['subfield_field_date_field_day'] = '11' request['subfield_field_date_field_day'] = '11'
request['subfield_field_date_field_year'] = '2011' request['subfield_field_date_field_year'] = str(DateTime().year())
request['subfield_field_date_field_hour'] = '09' request['subfield_field_date_field_hour'] = '09'
request['subfield_field_date_field_minute'] = '59' request['subfield_field_date_field_minute'] = '59'
request['field_list_field'] = 'bar' request['field_list_field'] = 'bar'
......
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