]> review.fuel-infra Code Review - openstack-build/heat-build.git/commitdiff
Differentiate resource types in test_update_rollback_remove
authorZane Bitter <zbitter@redhat.com>
Tue, 13 Aug 2013 13:18:17 +0000 (15:18 +0200)
committerZane Bitter <zbitter@redhat.com>
Tue, 13 Aug 2013 13:18:17 +0000 (15:18 +0200)
Ensure that the operations really are happening on the resource we think.

Change-Id: Ie0c85853378e3f0ef3eab4cd0714af0e94108406

heat/tests/test_parser.py

index 9f9a60955f0f9da055be43b7c2421e210609ec80..d5f94123c67b3f8025ef6cf0c8611306695fb337 100644 (file)
@@ -1214,7 +1214,7 @@ class StackTest(HeatTestCase):
     def test_update_rollback_remove(self):
         tmpl = {'Resources': {
                 'AResource': {'Type': 'GenericResourceType'},
-                'BResource': {'Type': 'GenericResourceType'}}}
+                'BResource': {'Type': 'ResourceWithPropsType'}}}
 
         self.stack = parser.Stack(self.ctx, 'update_test_stack',
                                   template.Template(tmpl),
@@ -1230,8 +1230,8 @@ class StackTest(HeatTestCase):
                                      template.Template(tmpl2))
 
         # patch in a dummy delete making the destroy fail
-        self.m.StubOutWithMock(generic_rsrc.GenericResource, 'handle_delete')
-        generic_rsrc.GenericResource.handle_delete().AndRaise(Exception)
+        self.m.StubOutWithMock(generic_rsrc.ResourceWithProps, 'handle_delete')
+        generic_rsrc.ResourceWithProps.handle_delete().AndRaise(Exception)
         self.m.ReplayAll()
 
         self.stack.update(updated_stack)