From 2d5ec548cf1752c98b0159bdb24bda1a1f4d90e4 Mon Sep 17 00:00:00 2001 From: Xavier Ordoquy Date: Fri, 14 Feb 2014 18:38:01 +0100 Subject: [PATCH] More test coverage. --- rest_framework/tests/test_serializer_nested.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/rest_framework/tests/test_serializer_nested.py b/rest_framework/tests/test_serializer_nested.py index 00af3dd10..c543b4756 100644 --- a/rest_framework/tests/test_serializer_nested.py +++ b/rest_framework/tests/test_serializer_nested.py @@ -351,7 +351,7 @@ class ForeignKeyNestedSerializerUpdateTests(TestCase): class NestedModelSerializerUpdateTests(TestCase): - def test_second_nested_level(self): + def test_allows_second_nesting_level(self): """ Make sure we can span relations for nested representations """ @@ -368,6 +368,9 @@ class NestedModelSerializerUpdateTests(TestCase): result = deserialize.object result.save() self.assertEqual(result.id, john.id) + self.assertEqual( + [i.id for i in result.blogpost_set.all()], + [i.id for i in john.blogpost_set.all()]) def test_nested_creation_in_update_only_mode(self): """