freeipa/tests/test_ipalib
Martin Kosek 092dd8db12 Replace float with Decimal
Having float type as a base type for floating point parameters in
ipalib introduces several issues, e.g. problem with representation
or value comparison. Python language provides a Decimal type which
help overcome these issues.

This patch replaces a float type and Float parameter with a
decimal.Decimal type in Decimal parameter. A precision attribute
was added to Decimal parameter that can be used to limit a number
of decimal places in parameter representation. This approach fixes
a problem with API.txt validation where comparison of float values
may fail on different architectures due to float representation error.

In order to safely transfer the parameter value over RPC it is
being converted to string which is then converted back to
decimal.Decimal number on a server side.

https://fedorahosted.org/freeipa/ticket/2260
2012-01-20 08:13:44 +01:00
..
__init__.py Change FreeIPA license to GPLv3+ 2010-12-20 17:19:53 -05:00
test_backend.py Change FreeIPA license to GPLv3+ 2010-12-20 17:19:53 -05:00
test_base.py Change FreeIPA license to GPLv3+ 2010-12-20 17:19:53 -05:00
test_cli.py Change FreeIPA license to GPLv3+ 2010-12-20 17:19:53 -05:00
test_config.py Let the framework be able to override the hostname. 2011-06-23 02:11:34 -04:00
test_crud.py Add API version and have server reject incompatible clients. 2011-01-14 14:26:22 -05:00
test_dn.py ticket 1569 - Test DN object non-latin Unicode support 2011-08-16 23:28:31 -04:00
test_encoder.py Change FreeIPA license to GPLv3+ 2010-12-20 17:19:53 -05:00
test_errors.py Fix i18n related failures in unit tests. 2011-03-01 10:31:41 -05:00
test_frontend.py Finalize plugin initialization on demand. 2011-11-22 00:52:24 -05:00
test_output.py Change FreeIPA license to GPLv3+ 2010-12-20 17:19:53 -05:00
test_parameters.py Replace float with Decimal 2012-01-20 08:13:44 +01:00
test_plugable.py Fix attempted write to attribute of read-only object. 2012-01-02 11:51:26 +03:00
test_rpc.py Change FreeIPA license to GPLv3+ 2010-12-20 17:19:53 -05:00
test_text.py Final i18n unit test fixes. 2011-03-01 10:31:43 -05:00
test_util.py Change FreeIPA license to GPLv3+ 2010-12-20 17:19:53 -05:00
test_x509.py ticket 1600 - convert unittests to use DN objects 2011-08-16 23:52:26 -04:00