#NEWLINE# def test_nested_relations( self ) : #NEWLINE# #INDENT# class TestSerializer ( serializers . ModelSerializer ) : #NEWLINE# #INDENT# class Meta ( ) : #NEWLINE# #INDENT# model = RelationalModel #NEWLINE# depth = 1 #NEWLINE# #UNINDENT# #UNINDENT# expected = dedent ( "\n            TestSerializer():\n                id = IntegerField(label='ID', read_only=True)\n                foreign_key = NestedSerializer(read_only=True):\n                    id = IntegerField(label='ID', read_only=True)\n                    name = CharField(max_length=100)\n                one_to_one = NestedSerializer(read_only=True):\n                    id = IntegerField(label='ID', read_only=True)\n                    name = CharField(max_length=100)\n                many_to_many = NestedSerializer(many=True, read_only=True):\n                    id = IntegerField(label='ID', read_only=True)\n                    name = CharField(max_length=100)\n                through = NestedSerializer(many=True, read_only=True):\n                    id = IntegerField(label='ID', read_only=True)\n                    name = CharField(max_length=100)\n        " ) #NEWLINE# self . assertEqual ( unicode_repr ( TestSerializer ( ) ) , self )