diff options
| author | Tom Christie | 2013-03-16 00:41:54 -0700 |
|---|---|---|
| committer | Tom Christie | 2013-03-16 00:41:54 -0700 |
| commit | ee20cf806b865a90517dd173cbffbe0286d52dab (patch) | |
| tree | 24ca124cb6249c5ed0fcbe6453fd8e028ec0a680 /rest_framework/tests/serializer_nested.py | |
| parent | 1aedf57f4a1eb7261162977944fe233b00d63b59 (diff) | |
| parent | 66bdd608e1e4bbb02a815104572b80034d73aa6b (diff) | |
| download | django-rest-framework-ee20cf806b865a90517dd173cbffbe0286d52dab.tar.bz2 | |
Merge pull request #735 from tomchristie/one-to-one-nested-wip
One to one writable nested model serializers (wip)
Diffstat (limited to 'rest_framework/tests/serializer_nested.py')
| -rw-r--r-- | rest_framework/tests/serializer_nested.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/rest_framework/tests/serializer_nested.py b/rest_framework/tests/serializer_nested.py index fcf644c7..6a29c652 100644 --- a/rest_framework/tests/serializer_nested.py +++ b/rest_framework/tests/serializer_nested.py @@ -1,5 +1,7 @@ """ Tests to cover nested serializers. + +Doesn't cover model serializers. """ from __future__ import unicode_literals from django.test import TestCase @@ -124,7 +126,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 +137,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 |
