mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-08-02 19:40:13 +03:00
More test coverage.
This commit is contained in:
parent
041b3ece2b
commit
2d5ec548cf
|
@ -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):
|
||||
"""
|
||||
|
|
Loading…
Reference in New Issue
Block a user