'Test case for replacing the alarm with non-updatable properties.
Make sure that the Alarm resource IS replaced when non-update-able
properties are changed.'

def test_mem_alarm_high_update_replace(self):

    t = template_format.parse(alarm_template)
    properties = t['Resources']['MEMAlarmHigh']['Properties']
    properties['AlarmActions'] = ['a']
    properties['Dimensions'] = [{'a': 'v'}]
    stack = utils.parse_stack(t)
    stack.store()
    self.m.ReplayAll()
    rsrc = self.create_alarm(t, stack, 'MEMAlarmHigh')
    props = copy.copy(rsrc.properties.data)
    props['MetricName'] = 'temp'
    snippet = rsrc_defn.ResourceDefinition(rsrc.name, rsrc.type(), props)
    updater = scheduler.TaskRunner(rsrc.update, snippet)
    self.assertRaises(resource.UpdateReplace, updater)
    scheduler.TaskRunner(rsrc.delete)()
    self.m.VerifyAll()
