'Test str_replace function parameter keys.
Pass wrong parameters to function and verify that we get
a KeyError.'

def test_str_replace_strict_invalid_param_keys(self):

    snippets = [{'str_replace_strict': {'t': 'Template    var1    string    var2', 'params': {'var1': 'foo', 'var2': 'bar'}}}, {'str_replace_strict': {'template': 'Template    var1    string    var2', 'param': {'var1': 'foo', 'var2': 'bar'}}}]
    for snippet in snippets:
        tmpl = template.Template(hot_ocata_tpl_empty)
        ex = self.assertRaises(exception.StackValidationFailed, self.resolve, snippet, tmpl)
    self.assertIn('"str_replace_strict"    syntax    should    be    str_replace_strict:\\n', six.text_type(ex))
