Index: main/waeup.kofa/trunk/src/waeup/kofa/widgets/tests/test_datetimewidget.py
===================================================================
--- main/waeup.kofa/trunk/src/waeup/kofa/widgets/tests/test_datetimewidget.py	(revision 8165)
+++ 	(revision )
@@ -1,127 +1,0 @@
-"""Formatted Datetime widget tests.
-"""
-import datetime
-import unittest
-import doctest
-from zope.schema import Datetime
-from zope.interface.verify import verifyClass
-
-from zope.formlib.tests.test_browserwidget import (
-    SimpleInputWidgetTest, BrowserWidgetTest, )
-from zope.formlib.interfaces import IInputWidget, IDisplayWidget
-from waeup.kofa.widgets.datetimewidget import (
-    FormattedDatetimeWidget, FormattedDatetimeDisplayWidget, )
-from zope.formlib.widgets import DateI18nWidget
-from zope.formlib.interfaces import ConversionError, WidgetInputError
-
-
-class FormattedDatetimeWidgetTest(SimpleInputWidgetTest):
-    """Documents and tests the formatted datetime widget.
-
-        >>> verifyClass(IInputWidget, FormattedDatetimeWidget)
-        True
-    """
-
-    _FieldFactory = Datetime
-    _WidgetFactory = FormattedDatetimeWidget
-
-    def testRender(self):
-        super(FormattedDatetimeWidgetTest, self).testRender(
-            datetime.datetime(2003, 3, 26, 12, 10, 20),
-            ('type="text"', 'id="field.foo"', 'name="field.foo"',
-             'value="2003-03-26 12:10:20"'))
-
-    def testRenderCustomFormat(self):
-        self._widget.date_format = "%d/%m/%y %H:%M:%S"
-        super(FormattedDatetimeWidgetTest, self).testRender(
-            datetime.datetime(2004, 3, 26, 12, 10, 20),
-            ('type="text"', 'id="field.foo"', 'name="field.foo"',
-             'value="26/03/04 12:10:20"'))
-
-    def testProperties(self):
-        self.assertEqual(self._widget.tag, 'input')
-        self.assertEqual(self._widget.type, 'text')
-        # By default the datetime format is ISO and the rendered CSS
-        # 'datetimepicker'
-        self.assertEqual(self._widget.cssClass, 'datetimepicker')
-        self.assertEqual(self._widget.extra, '')
-
-    def test_hasInput(self):
-        del self._widget.request.form['field.foo']
-        self.assertFalse(self._widget.hasInput())
-        self._widget.request.form['field.foo'] = u''
-        self.assertTrue(self._widget.hasInput())
-        self._widget.request.form['field.foo'] = u'2003-03-26 12:10:23'
-        self.assertTrue(self._widget.hasInput())
-
-    def test_getDefaultInputValue(self,
-            value=u'2004-03-26 12:10:20',
-            check_value=datetime.datetime(2004, 3, 26, 12, 10, 20)):
-        self._widget.request.form['field.foo'] = u''
-        self.assertRaises(WidgetInputError, self._widget.getInputValue)
-        self._widget.request.form['field.foo'] = value
-        self.assertEquals(self._widget.getInputValue(), check_value)
-        self._widget.request.form['field.foo'] = u'abc'
-        self.assertRaises(ConversionError, self._widget.getInputValue)
-
-    def test_getCustomInputValue_de(self):
-        self._widget.date_format = "%d.%m.%y %H:%M:%S"
-        self.test_getDefaultInputValue(u'26.03.04 12:10:20')
-
-    def test_getCustomInputValue_de2(self):
-        self._widget.date_format = "%d.%m.%Y %H:%M:%S"
-        self.test_getDefaultInputValue(u'26.03.2004 12:10:20')
-
-    def test_getCustomInputValue_us(self):
-        self._widget.date_format = "%m/%d/%Y %H:%M:%S"
-        self.test_getDefaultInputValue(u'03/26/2004 12:10:20')
-
-class FormattedDatetimeDisplayWidgetTest(BrowserWidgetTest):
-    """The FormatterdDisplayDatetimeWidget complies with IDisplayWidget.
-
-        >>> verifyClass(IDisplayWidget, FormattedDatetimeDisplayWidget)
-        True
-    """
-
-    _WidgetFactory = FormattedDatetimeDisplayWidget
-    expected_class = "dateTime"
-
-    def setUp(self):
-        super(FormattedDatetimeDisplayWidgetTest, self).setUp()
-        self._value = datetime.date(2004, 12, 01)
-
-    def testDefaultDisplayStyle(self):
-        self.assertFalse(self._widget.displayStyle)
-
-    def testRenderDefault(self):
-        self._widget.setRenderedValue(self._value)
-        self.verifyResult(self._widget(),
-                          ["<span",
-                           'class="%s"' % self.expected_class,
-                           "2004-12-01",
-                           "</span"])
-
-    def testRenderCustom(self):
-        self._widget.setRenderedValue(self._value)
-        self._widget.date_format = '%m/%d/%Y'
-        self.verifyResult(self._widget(),
-                          ["<span",
-                           'class="%s"' % self.expected_class,
-                           "12/01/2004",
-                           "</span"])
-
-    def testRenderNone(self):
-        self._widget.setRenderedValue(None)
-        self._widget.date_format = '%m/%d/%Y'
-        self.assertEqual(self._widget(), '')
-
-    def testNoValueSet(self):
-        self._widget.date_format = '%m/%d/%Y'
-        self.assertEqual(self._widget(), '')
-
-def test_suite():
-    return unittest.TestSuite((
-        unittest.makeSuite(FormattedDatetimeWidgetTest),
-        unittest.makeSuite(FormattedDatetimeDisplayWidgetTest),
-        doctest.DocTestSuite(),
-        ))
