#NEWLINE# def test_embedding_recursive_restricted( self ) : #NEWLINE# #INDENT# class EmbeddingSerializer ( DocumentSerializer ) : #NEWLINE# #INDENT# class Meta ( ) : #NEWLINE# #INDENT# model = RecursiveEmbeddingDoc #NEWLINE# depth_embedding = 2 #NEWLINE# #UNINDENT# #UNINDENT# expected = dedent ( '\n            EmbeddingSerializer():\n                id = ObjectIdField(read_only=True)\n                embedded = EmbeddedSerializer(required=False):\n                    name = CharField(required=False)\n                    embedded = EmbeddedSerializer(required=False):\n                        name = CharField(required=False)\n                        embedded = HiddenField(default=None, required=False)\n        ' ) #NEWLINE# serializer = EmbeddingSerializer ( ) #NEWLINE# assert ( unicode_repr ( expected ) == expected )