#NEWLINE# def test_document_trash_with_permissions( self ) : #NEWLINE# #INDENT# self . login ( username = TEST_USER_USERNAME , password = TEST_USER_PASSWORD ) #NEWLINE# self . role . permissions . add ( permission_document_trash . stored_permission ) #NEWLINE# response = self . post ( 'documents:document_trash' , args = ( self . document . pk , ) , follow = True ) #NEWLINE# self . assertContains ( self , text = 'success' , status_code = 200 ) #NEWLINE# self . assertEqual ( DeletedDocument . objects . count ( ) , 1 ) #NEWLINE# self . assertEqual ( Document . objects . count ( ) , 0 )