#NEWLINE# def test_get_serializer_related_field_when_not_safe_request( self ) : #NEWLINE# #INDENT# request = self . request_factory . patch ( '/api/cars' , data = { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } ) #NEWLINE# car_serializer = CarSerializer ( instance = self . car , context = { #NEWLINE# #INDENT# 'request' : car_serializer , #NEWLINE# #UNINDENT# } ) #NEWLINE# self . assertEqual ( car_serializer . serializer_related_field , RalphRelatedField )