mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-07-23 22:49:50 +03:00
fixed typo
This commit is contained in:
parent
13e64a66a2
commit
8bbfa90ff4
|
@ -782,7 +782,7 @@ class NestedSerializerContextTests(TestCase):
|
|||
def _callable(self, instance):
|
||||
if not 'context_item' in self.context:
|
||||
raise RuntimeError("context isn't getting passed into 2nd level nested serializer")
|
||||
return "callable in AlbumSerializer"
|
||||
return "success"
|
||||
|
||||
class AlbumSerializer(serializers.ModelSerializer):
|
||||
class Meta:
|
||||
|
@ -795,7 +795,7 @@ class NestedSerializerContextTests(TestCase):
|
|||
def _callable(self, instance):
|
||||
if not 'context_item' in self.context:
|
||||
raise RuntimeError("context isn't getting passed into 1st level nested serializer")
|
||||
return "callable in AlbumSerializer"
|
||||
return "success"
|
||||
|
||||
class AlbumCollectionSerializer(serializers.Serializer):
|
||||
albums = AlbumSerializer(source="albums", )
|
||||
|
|
Loading…
Reference in New Issue
Block a user