aboutsummaryrefslogtreecommitdiffstats
path: root/djangorestframework/tests
diff options
context:
space:
mode:
Diffstat (limited to 'djangorestframework/tests')
-rw-r--r--djangorestframework/tests/serializer.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/djangorestframework/tests/serializer.py b/djangorestframework/tests/serializer.py
index 9f629050..fff72c02 100644
--- a/djangorestframework/tests/serializer.py
+++ b/djangorestframework/tests/serializer.py
@@ -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):
"""