#NEWLINE# def test_report_comment_no_type( self ) : #NEWLINE# #INDENT# self . _set_up_private_project_comment_reports ( ) #NEWLINE# payload = { #NEWLINE# #INDENT# 'data' : { #NEWLINE# #INDENT# 'type' : '' , #NEWLINE# 'attributes' : { #NEWLINE# #INDENT# 'category' : 'spam' , #NEWLINE# 'message' : 'delicious spam' , #NEWLINE# #UNINDENT# } , #NEWLINE# #UNINDENT# } , #NEWLINE# #UNINDENT# } #NEWLINE# res = self . app . post_json_api ( self . private_url , self , auth = self . user . auth , expect_errors = True ) #NEWLINE# assert_equal ( res . status_code , 400 ) #NEWLINE# assert_equal ( res . json [ 'errors' ] [ 0 ] [ 'detail' ] , 'This field may not be blank.' ) #NEWLINE# assert_equal ( res . json [ 'errors' ] [ 0 ] [ 'source' ] [ 'pointer' ] , '/data/type' )