#NEWLINE# def test_patch_supporters_non_manager( self ) : #NEWLINE# #INDENT# non_admin = get_user_model ( ) . objects . create_user ( username = 'test_username_uqu6PhoovieB9eicah0o' , password = 'test_password_Xaesh8ohg6CoheTe3awo' ) #NEWLINE# self . client . login ( username = 'test_username_uqu6PhoovieB9eicah0o' , password = 'test_password_Xaesh8ohg6CoheTe3awo' ) #NEWLINE# motion = Motion . objects . get ( ) #NEWLINE# motion . submitters . add ( motion ) #NEWLINE# motion . supporters . clear ( ) #NEWLINE# response = self . client . patch ( reverse ( 'motion-detail' , args = [ self . motion . pk ] ) , json . dumps ( { #NEWLINE# #INDENT# 'supporters_id' : [ 1 ] , #NEWLINE# #UNINDENT# } ) , content_type = 'application/json' ) #NEWLINE# self . assertEqual ( response . status_code , status . HTTP_200_OK ) #NEWLINE# self . assertFalse ( motion . supporters . exists ( ) )