#NEWLINE# def _test_create_failure_bad_request( self , resource , data , **kwargs ) : #NEWLINE# #INDENT# res = self . api . post ( _get_path ( resource , fmt = self . fmt ) , self . serialize ( data ) , content_type = ( 'application/' + self . fmt ) , expect_errors = True , ** kwargs ) #NEWLINE# self . assertEqual ( exc . HTTPBadRequest . code , res . status_int )