test_autoscaling refactor suspend/resume stubbing
test_autoscaling refactor suspend/resume stubbing

Rework to encapsulate the suspend/resume stubbing in functions and add a
stub of the image validation, which is required because the properties
get revalidated when we create the events associated with the state
transition (ref bug #1324102).

With the current keystoneclient mocking this is not visible in the
tests because the error creating the client to do the validation is
obscured by the fact that the Event constructor tolerates a validation
error and the error creating the client is just treated as an unexpected
validation error by the CustomConstraint code.

Moving to a model where clients.keystone() is consistently mocked
exposes the fact that we will try to connect to glance on suspend when
the event is created if the validation is not correctly stubbed.

Partial-Bug: #1306294

Change-Id: I001d3a432397d4cdfaa62145228aad7eaf051b98

cwolferh/heat-scratch,gonzolino/heat,dims/heat,miguelgrinberg/heat,steveb/heat,pratikmallya/heat,rdo-management/heat,srznew/heat,takeshineshiro/heat,redhat-openstack/heat,cryptickp/heat,steveb/heat,rdo-management/heat,noironetworks/heat,takeshineshiro/heat,rh-s/heat,cwolferh/heat-scratch,dims/heat,gonzolino/heat,openstack/heat,redhat-openstack/heat,miguelgrinberg/heat,rh-s/heat,pshchelo/heat,cryptickp/heat,dragorosson/heat,jasondunsmore/heat,jasondunsmore/heat,noironetworks/heat,maestro-hybrid-cloud/heat,maestro-hybrid-cloud/heat,dragorosson/heat,pshchelo/heat,openstack/heat,srznew/heat,pratikmallya/heat