mirror of
https://github.com/encode/django-rest-framework.git
synced 2024-11-26 11:33:59 +03:00
Merge pull request #49 from garciasolero/master
Testing serialization error
This commit is contained in:
commit
30cd9335e0
|
@ -40,6 +40,12 @@ class TestObjectToData(TestCase):
|
|||
now = datetime.datetime.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):
|
||||
"""
|
||||
|
|
Loading…
Reference in New Issue
Block a user