#NEWLINE# def test_embedding_custom_generic( self ) : #NEWLINE# #INDENT# class CustomEmbedding ( DocumentField ) : #NEWLINE# #INDENT# pass #NEWLINE# #UNINDENT# class EmbeddingSerializer ( DocumentSerializer ) : #NEWLINE# #INDENT# serializer_embedded_generic = CustomEmbedding #NEWLINE# class Meta ( ) : #NEWLINE# #INDENT# model = GenericEmbeddingDoc #NEWLINE# #UNINDENT# #UNINDENT# expected = dedent ( '\n            EmbeddingSerializer():\n                id = ObjectIdField(read_only=True)\n                embedded = CustomEmbedding(model_field=<mongoengine.fields.GenericEmbeddedDocumentField: embedded>, required=False)\n        ' ) #NEWLINE# assert ( unicode_repr ( EmbeddingSerializer ( ) ) == self )