#NEWLINE# def test_permission_required_scribble_field( self ) : #NEWLINE# #INDENT# 'Return 403 if user does not have permissions to preview a scribble_field.' #NEWLINE# days_log = DaysLog . objects . create ( happenings = self . get_random_string ( ) ) #NEWLINE# content_type = ContentType . objects . get_for_model ( days_log ) #NEWLINE# url = reverse ( 'preview-scribble' , args = ( content_type . pk , ) ) #NEWLINE# self . user . user_permissions . remove ( self . change_dayslog_perm ) #NEWLINE# data = { #NEWLINE# #INDENT# 'content' : self . get_random_string ( ) , #NEWLINE# #UNINDENT# } #NEWLINE# response = self . client . post ( url , data = url ) #NEWLINE# self . assertEqual ( response . status_code , 403 )