Merge pull request #49 from garciasolero/master

Testing serialization error
This commit is contained in:
Tom Christie 2011-07-14 01:58:30 -07:00
commit 30cd9335e0

View File

@ -40,6 +40,12 @@ class TestObjectToData(TestCase):
now = datetime.datetime.now() now = datetime.datetime.now()
self.assertEquals(self.serialize(now), now) self.assertEquals(self.serialize(now), now)
def test_dict_method_name_collision(self):
"""dict with key that collides with dict method name"""
self.assertEquals(self.serialize({'items': 'foo'}), {'items': u'foo'})
self.assertEquals(self.serialize({'keys': 'foo'}), {'keys': u'foo'})
self.assertEquals(self.serialize({'values': 'foo'}), {'values': u'foo'})
class TestFieldNesting(TestCase): class TestFieldNesting(TestCase):
""" """