aboutsummaryrefslogtreecommitdiffstats
path: root/rest_framework/tests/serializer_nested.py
diff options
context:
space:
mode:
authorMark Aaron Shirley2013-03-12 20:59:25 -0700
committerMark Aaron Shirley2013-03-14 15:17:13 -0700
commit3006e3825f29e920f881b816fd71566bf0e8d341 (patch)
tree729a93c40c06769470ca57c770fcc89f8ed8b05e /rest_framework/tests/serializer_nested.py
parentb6b686d285e376dbf4f2d2f15bd0e3ef0f1c3a37 (diff)
downloaddjango-rest-framework-3006e3825f29e920f881b816fd71566bf0e8d341.tar.bz2
One-to-one writable, nested serializer support
Diffstat (limited to 'rest_framework/tests/serializer_nested.py')
-rw-r--r--rest_framework/tests/serializer_nested.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/rest_framework/tests/serializer_nested.py b/rest_framework/tests/serializer_nested.py
index fcf644c7..299c3bc5 100644
--- a/rest_framework/tests/serializer_nested.py
+++ b/rest_framework/tests/serializer_nested.py
@@ -124,7 +124,7 @@ class WritableNestedSerializerObjectTests(TestCase):
def __init__(self, order, title, duration):
self.order, self.title, self.duration = order, title, duration
- def __cmp__(self, other):
+ def __eq__(self, other):
return (
self.order == other.order and
self.title == other.title and
@@ -135,7 +135,7 @@ class WritableNestedSerializerObjectTests(TestCase):
def __init__(self, album_name, artist, tracks):
self.album_name, self.artist, self.tracks = album_name, artist, tracks
- def __cmp__(self, other):
+ def __eq__(self, other):
return (
self.album_name == other.album_name and
self.artist == other.artist and