#NEWLINE# def test_pf_feedback_user_permissions_check( self ) : #NEWLINE# #INDENT# feedback_id = self . setup_useable_feedback ( ) #NEWLINE# with self . app as c : #NEWLINE# #INDENT# with c . session_transaction ( ) as sess : #NEWLINE# #INDENT# self . setup_user_login ( sess ) #NEWLINE# #UNINDENT# data = { #NEWLINE# #INDENT# 'feedback_id' : str ( feedback_id ) , #NEWLINE# #UNINDENT# } #NEWLINE# response = c . put ( '/feedback/' , data = json . dumps ( data ) , content_type = 'application/json' ) #NEWLINE# #UNINDENT# assert ( response . status_code == 404 ) , 'Incorrect response code received' #NEWLINE# feedback = self . db . feedback . find_one ( ) #NEWLINE# assert feedback , 'No feedback items found' #NEWLINE# assert ( feedback . get ( '_id' ) == feedback_id ) , 'Did not find correct feedback item' #NEWLINE# assert ( feedback . get ( 'complete' ) is False ) , 'Feedback marked complete when it should not have been'