#NEWLINE# def test_serializer_get_fields_with_ignore_fields( self ) : #NEWLINE# #INDENT# from rest_framework.fields import CharField #NEWLINE# obj = SearchQuerySet ( ) . filter ( lastname = 'Foreman' ) [ 0 ] #NEWLINE# serializer = self . serializer6 ( instance = obj ) #NEWLINE# fields = serializer . get_fields ( ) #NEWLINE# assert isinstance ( fields , dict ) , self . fail ( 'serializer.data is not a dict' ) #NEWLINE# assert isinstance ( fields [ 'text' ] , CharField ) , self . fail ( "serializer 'text' field is not a CharField instance" ) #NEWLINE# assert isinstance ( fields [ 'firstname' ] , CharField ) , self . fail ( "serializer 'firtname' field is not a CharField instance" ) #NEWLINE# assert isinstance ( fields [ 'lastname' ] , CharField ) , self . fail ( "serializer 'lastname' field is not a CharField instance" ) #NEWLINE# assert ( 'autocomplete' not in fields ) , self . fail ( "serializer 'autocomplete' should not be present" )