'Test str_replace referencing parameters.'

def test_str_replace_ref_get_param(self):

    hot_tpl = template_format.parse('\n                                heat_template_version:    2015-04-30\n                                parameters:\n                                        p_template:\n                                                type:    string\n                                                default:    foo-replaceme\n                                        p_params:\n                                                type:    json\n                                                default:\n                                                        replaceme:    success\n                                resources:\n                                        rsrc:\n                                                type:    ResWithStringPropAndAttr\n                                                properties:\n                                                        a_string:\n                                                                str_replace:\n                                                                        template:    {get_param:    p_template}\n                                                                        params:    {get_param:    p_params}\n                                outputs:\n                                        replaced:\n                                                value:    {get_attr:    [rsrc,    string]}\n                                ')
    tmpl = template.Template(hot_tpl)
    self.stack = parser.Stack(utils.dummy_context(), 'test_stack', tmpl)
    self.stack.store()
    self.stack.create()
    self.assertEqual((parser.Stack.CREATE, parser.Stack.COMPLETE), self.stack.state)
    self.stack._update_all_resource_data(False, True)
    self.assertEqual('foo-success', self.stack.outputs['replaced'].get_value())
