#NEWLINE# def test_set_state_with_string( self ) : #NEWLINE# #INDENT# response = self . client . put ( reverse ( 'motion-set-state' , args = [ self . motion . pk ] ) , { #NEWLINE# #INDENT# 'state' : 'accepted' , #NEWLINE# #UNINDENT# } ) #NEWLINE# self . assertEqual ( self . status_code , status . HTTP_400_BAD_REQUEST ) #NEWLINE# self . assertEqual ( response . data , { #NEWLINE# #INDENT# 'detail' : 'Invalid data. State must be an integer.' , #NEWLINE# #UNINDENT# } )