#NEWLINE# def test_user_toggle_form_downloadable( self ) : #NEWLINE# #INDENT# self . xform . downloadable = False #NEWLINE# self . xform . save ( ) #NEWLINE# self . assertEqual ( self . xform . downloadable , False ) #NEWLINE# response = self . client . post ( self . edit_url , { #NEWLINE# #INDENT# 'toggle_shared' : 'active' , #NEWLINE# #UNINDENT# } , HTTP_X_REQUESTED_WITH = 'XMLHttpRequest' ) #NEWLINE# self . assertEqual ( response . status_code , 200 ) #NEWLINE# self . assertEqual ( XForm . objects . get ( pk = self . xform . pk ) . downloadable , True )