diff options
author | kain <me@kain-jy.com> | 2014-11-08 06:42:46 +0900 |
---|---|---|
committer | kain <me@kain-jy.com> | 2014-11-08 06:42:46 +0900 |
commit | 886c4bf1877538a6acc28dd5f9bdd1c8f1c30dd9 (patch) | |
tree | d12dfd800c8e19f4b6a6731d4805f24d0e28038b /tests | |
parent | 49ccffed3587ce627ec7aa54af0e0db301848650 (diff) | |
download | boto-886c4bf1877538a6acc28dd5f9bdd1c8f1c30dd9.tar.gz |
Added toggle to use boolean as numeric type for backwards compatibility
Diffstat (limited to 'tests')
-rw-r--r-- | tests/unit/dynamodb/test_types.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/unit/dynamodb/test_types.py b/tests/unit/dynamodb/test_types.py index c022b168..ed72cc39 100644 --- a/tests/unit/dynamodb/test_types.py +++ b/tests/unit/dynamodb/test_types.py @@ -80,6 +80,10 @@ class TestDynamizer(unittest.TestCase): with self.assertRaises(DynamoDBNumberError): dynamizer.encode(1.1) + def test_non_boolean_conversions(self): + dynamizer = types.NonBooleanDynamizer() + self.assertEqual(dynamizer.encode(True), {'N': '1'}) + def test_lossy_float_conversions(self): dynamizer = types.LossyFloatDynamizer() # Just testing the differences here, specifically float conversions: |