]> review.fuel-infra Code Review - openstack-build/heat-build.git/commit
Fix problem with mocking tasks
authorZane Bitter <zbitter@redhat.com>
Wed, 4 Sep 2013 08:44:39 +0000 (10:44 +0200)
committerZane Bitter <zbitter@redhat.com>
Wed, 4 Sep 2013 08:44:43 +0000 (10:44 +0200)
commitf28446e970258fac0979ddd0f6d436cc779cb488
tree11d4c2151a1faaa49b31265957843ffea099f826
parent8f57e2e8b2019b72de5ee5496746944f306784f8
Fix problem with mocking tasks

It was previously impossible to stub out a task with mox, because when the
TaskRunner attempted to get the __name__ attribute it prompted an assertion
in the mock. Using hasattr() instead of getattr() eliminates this issue.

Change-Id: I3757a77daf59cbb3c0a8b60329d490a89e7ec1d3
heat/engine/scheduler.py