'Updating the resource calls appropriate update method with pyrax.'

def test_update(self):

    self._setup_test_stack(self.policy_template)
    resource = self.stack['my_policy']
    uprops = copy.deepcopy(dict(resource.properties.data))
    uprops['changePercent'] = 50
    del uprops['change']
    template = rsrc_defn.ResourceDefinition(resource.name, resource.type(), uprops)
    scheduler.TaskRunner(resource.update, template)()
    self.assertEqual({'name': '+10    on    webhook', 'scaling_group': 'my-group-id', 'change': 50, 'is_percent': True, 'cooldown': 0, 'policy_type': 'webhook'}, self.fake_auto_scale.policies['0'].kwargs)
