#NEWLINE# def test_str_field( self ) : #NEWLINE# #INDENT# request = self . request_factory . get ( '/api/foos' ) #NEWLINE# serializer = FooSerializer ( self . foo , context = { #NEWLINE# #INDENT# 'request' : request , #NEWLINE# #UNINDENT# } ) #NEWLINE# self . assertEqual ( serializer . data [ '__str__' ] , str ( self . foo ) )