diff options
author | Steve Baker <sbaker@redhat.com> | 2014-06-17 14:40:39 +1200 |
---|---|---|
committer | Steve Baker <sbaker@redhat.com> | 2014-07-21 13:00:26 -0400 |
commit | 956632844a251cf0ce61d7eab5d2caaf501546bc (patch) | |
tree | 2ede6b7123ccd0e4d68d037a11b24f5792e08eeb /heat/tests/test_notifications.py | |
parent | ec35f074ccc9c11d8bad3059eaacb5cfe14c4653 (diff) | |
download | heat-956632844a251cf0ce61d7eab5d2caaf501546bc.tar.gz |
Move glance_utils functions to glance client plugin
The glance client plugin is a more obvious home for this sort
of function, and this change makes mocking of these functions
much easier since a mocked client is no longer needed.
To access the methods defined in the client plugin the method
Resource.client_plugin has been added. When all clients are
contributed by plugins then method Resource.client will call
Resource.client_plugin.
glance_utils can be deleted since it was only added at the
beginning of the Juno cycle.
The image constraint has also been moved to the glance plugin.
Change-Id: Id31ccd605411ca034addc67d8aadf7cea0904bfd
Diffstat (limited to 'heat/tests/test_notifications.py')
-rw-r--r-- | heat/tests/test_notifications.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/heat/tests/test_notifications.py b/heat/tests/test_notifications.py index 195794782..cd78fc722 100644 --- a/heat/tests/test_notifications.py +++ b/heat/tests/test_notifications.py @@ -15,12 +15,12 @@ import mock from heat.common import exception from heat.common import template_format +from heat.engine.clients.os import glance from heat.engine import environment from heat.engine import parser from heat.engine import resource # imports for mocking from heat.engine.resources import autoscaling -from heat.engine.resources import image from heat.engine.resources import instance from heat.engine.resources import loadbalancer from heat.engine.resources import nova_keypair @@ -167,7 +167,7 @@ class ScaleNotificationTest(common.HeatTestCase): def mock_stack_except_for_group(self): self.m_validate = self.patchobject(parser.Stack, 'validate') self.patchobject(nova_keypair.KeypairConstraint, 'validate') - self.patchobject(image.ImageConstraint, 'validate') + self.patchobject(glance.ImageConstraint, 'validate') self.patchobject(instance.Instance, 'handle_create')\ .return_value = True self.patchobject(instance.Instance, 'check_create_complete')\ |