fix unittest_widgets.py: remove stupid (copy/paste) now().strftime call tls-sprint
authorAdrien Di Mascio <Adrien.DiMascio@logilab.fr>
Wed, 18 Feb 2009 15:59:09 +0100
branchtls-sprint
changeset 807 e3cabbdd172a
parent 806 a95e7097924a
child 808 8d739f6e8ef5
fix unittest_widgets.py: remove stupid (copy/paste) now().strftime call
web/test/unittest_widgets.py
--- a/web/test/unittest_widgets.py	Wed Feb 18 15:58:35 2009 +0100
+++ b/web/test/unittest_widgets.py	Wed Feb 18 15:59:09 2009 +0100
@@ -221,7 +221,7 @@
     def test_float_widget(self):
         w = self.get_widget('Personne', 'salary', 'Float')
         self.assertEquals(w.name, 'salary')
-        format = now().strftime(self.vreg.property_value('ui.float-format'))
+        format = self.vreg.property_value('ui.float-format')
         self.assertEquals(w.render_example(self.request()), format % 1.23)
         self.assertDictEquals(w.attrs, {'accesskey': 's', 'maxlength': 15, 'size': 5})
         entity = self.etype_instance('Personne')
@@ -236,7 +236,7 @@
     def test_float_widget_previous_value(self):
         w = self.get_widget('Personne', 'salary', 'Float')
         self.assertEquals(w.name, 'salary')
-        format = now().strftime(self.vreg.property_value('ui.float-format'))
+        format = self.vreg.property_value('ui.float-format')
         self.assertEquals(w.render_example(self.request()), format % 1.23)
         self.assertDictEquals(w.attrs, {'accesskey': 's', 'maxlength': 15, 'size': 5})
         req = self.request()
@@ -345,7 +345,7 @@
     def test_nonregr_float_widget_with_none(self):
         w = self.get_widget('Personne', 'salary', 'Float')
         self.assertEquals(w.name, 'salary')
-        format = now().strftime(self.vreg.property_value('ui.float-format'))
+        format = self.vreg.property_value('ui.float-format')
         self.assertEquals(w.render_example(self.request()), format % 1.23)
         self.assertDictEquals(w.attrs, {'accesskey': 's', 'maxlength': 15, 'size': 5})
         req = self.request()