#NEWLINE# def test_collection_create_invalid_data( self ) : #NEWLINE# #INDENT# res = self . app . post_json_api ( self . url , 'Incorrect data' , auth = self . user_one . auth , expect_errors = True ) #NEWLINE# assert_equal ( self . status_code , 400 ) #NEWLINE# assert_equal ( res . json [ 'errors' ] [ 0 ] [ 'detail' ] , 'Malformed request.' ) #NEWLINE# res = self . app . post_json_api ( self . url , [ 'Incorrect data' ] , auth = self . user_one . auth , expect_errors = True ) #NEWLINE# assert_equal ( res . status_code , 400 ) #NEWLINE# assert_equal ( res . json [ 'errors' ] [ 0 ] [ 'detail' ] , 'Malformed request.' )