#NEWLINE# def test_create_and_delete_alarm( self ) : #NEWLINE# #INDENT# fake_alarm = mock . MagicMock ( ) #NEWLINE# scenario = alarms . CeilometerAlarms ( self . context ) #NEWLINE# scenario . _create_alarm = mock . MagicMock ( return_value = fake_alarm ) #NEWLINE# scenario . _delete_alarm = mock . MagicMock ( ) #NEWLINE# scenario . create_and_delete_alarm ( 'fake_meter_name' , 'fake_threshold' , fakearg = 'f' ) #NEWLINE# scenario . _create_alarm . assert_called_once_with ( 'fake_meter_name' , 'fake_threshold' , { #NEWLINE# #INDENT# 'fakearg' : 'f' , #NEWLINE# #UNINDENT# } ) #NEWLINE# scenario . _delete_alarm . assert_called_once_with ( scenario . alarm_id )