]> review.fuel-infra Code Review - openstack-build/heat-build.git/commitdiff
Use new Parameters class in unit test
authorZane Bitter <zbitter@redhat.com>
Mon, 5 Nov 2012 16:55:05 +0000 (17:55 +0100)
committerZane Bitter <zbitter@redhat.com>
Mon, 5 Nov 2012 16:55:19 +0000 (17:55 +0100)
This test was still using the old CheckedDict implementation for
parameters.

Change-Id: I2ade5a81867d6b9f7517061e520da99575e8fbbd
Signed-off-by: Zane Bitter <zbitter@redhat.com>
heat/tests/test_parser.py

index dfc10fb7130fef93cfb83f6a4a901584921231ef..b8a04d8a2f6f32c44346c9ab78f902a41e4d928c 100644 (file)
@@ -22,8 +22,8 @@ import json
 from heat.common import context
 from heat.common import exception
 from heat.engine import parser
+from heat.engine import parameters
 from heat.engine import template
-from heat.engine import checkeddict
 from heat.engine.resources import Resource
 
 
@@ -183,8 +183,8 @@ class TemplateTest(unittest.TestCase):
                          r_snippet)
 
     def test_param_ref_missing(self):
-        params = checkeddict.CheckedDict("test")
-        params.addschema('foo', {"Required": True})
+        tmpl = {'Parameters': {'foo': {'Type': 'String', 'Required': True}}}
+        params = parameters.Parameters('test', tmpl)
         snippet = {"Ref": "foo"}
         self.assertRaises(exception.UserParameterMissing,
                           parser.Template.resolve_param_refs,