]> review.fuel-infra Code Review - openstack-build/heat-build.git/commit
Stub ResourceWithProps instead of GenericResource
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)
commit3297f83688d0548d3ee3f1b8c9677037189c5bf7
treec0f8555bd8f84bdf7e978543eb5f856ee6a60c55
parent94a9cf26d7660e6cc37b4cf1dab30fba2075b1f0
Stub ResourceWithProps instead of GenericResource

Stubbing methods in a superclass is an all-or-nothing affair: once a stub
in the subclass is unset, the subclass will no longer inherit changes in
the superclass (i.e. if you then stub out the same method in the
superclass, the subclass will be unaffected).

Previously, we always set the stubs in the superclass (for historical
reasons, to avoid making this change). This would lead to tests that want
to differentiate between types (by stubbing in the derived class)
interfering with the operation of other tests. This patch changes to always
setting the stubs in the derived class.

Change-Id: I2c8dbd22826da14611a6a3f55321f0016446580a
heat/tests/test_parser.py
heat/tests/test_resource.py