'Test update the composite alarm.'

def test_handle_update(self):

    test_stack = self.create_stack(template=alarm_template)
    update_mock = self.patchobject(self.fa.alarm, 'update')
    test_stack.create()
    rsrc = test_stack['cps_alarm']
    self.assertEqual((rsrc.CREATE, rsrc.COMPLETE), rsrc.state)
    after_props = copy.deepcopy(rsrc.properties.data)
    update_props = {'enabled': False, 'repeat_actions': False, 'insufficient_data_actions': [], 'ok_actions': ['signal_handler']}
    after_props.update(update_props)
    snippet = rsrc_defn.ResourceDefinition(rsrc.name, rsrc.type(), after_props)
    scheduler.TaskRunner(rsrc.update, snippet)()
    self.assertEqual((rsrc.UPDATE, rsrc.COMPLETE), rsrc.state)
    self.assertEqual(1, update_mock.call_count)
