Fix encoding of floating point values into XML.
Review Request #8249 — Created June 18, 2016 and submitted
The encoding functionality in
XMLEncoderAdapterwould throw an exception
when encountering a floating point value, indicating that the value was not
XML serializable. This has been corrected by adding special handing for
floating point values, analogous to how other data types are handled.
Added new unit tests to exercise both the JSON and XML encoder adapters. Encoding is attempted on a variety of data types. Prior to the fix, the XML-based test would fail due to the presence of floating point data types.
Tool: PEP8 Style Checker Processed Files: djblets/webapi/tests/test_encoders.py djblets/webapi/encoders.py Tool: Pyflakes Processed Files: djblets/webapi/tests/test_encoders.py djblets/webapi/encoders.py