From 456c0f5d8ec1a34ea4e5ce64d82d3259069e2f4a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?J=C3=A9rome=20Perrin?= <jerome@nexedi.com>
Date: Tue, 22 Jun 2010 08:31:49 +0000
Subject: [PATCH] make sure render_dict on float fields works as expected when
 using "," as decimal separator

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@36497 20353a03-c40f-0410-a6d1-a30d3c3de9de
---
 product/ERP5Form/tests/testFields.py | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/product/ERP5Form/tests/testFields.py b/product/ERP5Form/tests/testFields.py
index 2debb758ac..e9baf2e1ac 100644
--- a/product/ERP5Form/tests/testFields.py
+++ b/product/ERP5Form/tests/testFields.py
@@ -140,6 +140,12 @@ class TestFloatField(ERP5TypeTestCase):
                            format='0.0000',
                            type='float'),
                       self.field.render_dict(0.12345))
+    # this also work when using , as decimal separator
+    self.field.values['input_style'] = '-1.234,5'
+    self.assertEquals(dict(query=0.12345,
+                           format='0.0000',
+                           type='float'),
+                      self.field.render_dict(0.12345))
   
   def test_render_string_value(self):
     self.field.values['precision'] = 2
-- 
2.30.9