#NEWLINE# def test_plans_post_invalid_yaml( self , handler_mock , resp_mock , request_mock ) : #NEWLINE# #INDENT# request_mock . body = 'invalid yaml file' #NEWLINE# request_mock . content_type = 'application/x-yaml' #NEWLINE# handler_create = handler_mock . return_value . create #NEWLINE# handler_create . return_value = fakes . FakePlan ( ) #NEWLINE# plan . PlansController ( ) . post ( ) #NEWLINE# self . assertEqual ( 400 , resp_mock . status )