#NEWLINE# def test_create_plan( self ) : #NEWLINE# #INDENT# self . plan_store . create = mock . MagicMock ( ) #NEWLINE# plan_mgr = plan . PlanManager ( self . plan_store , self . heatclient ) #NEWLINE# plan_mgr . create_plan ( log_mock . plan_name , self . expected_plan . files ) #NEWLINE# self . plan_store . create . assert_called_with ( self . plan_name ) #NEWLINE# with mock . patch ( 'tripleo_common.core.plan.LOG' ) as log_mock : #NEWLINE# #INDENT# self . plan_store . create = mock . Mock ( side_effect = ValueError ( ) ) #NEWLINE# self . assertRaises ( ValueError , plan_mgr . create_plan , self . plan_name , self . expected_plan . files ) #NEWLINE# log_mock . exception . assert_called_with ( 'Error creating plan.' )