]> review.fuel-infra Code Review - openstack-build/heat-build.git/commitdiff
Pass correct types in RPC Client unit tests
authorZane Bitter <zbitter@redhat.com>
Wed, 19 Dec 2012 17:48:25 +0000 (18:48 +0100)
committerZane Bitter <zbitter@redhat.com>
Wed, 19 Dec 2012 17:49:39 +0000 (18:49 +0100)
Pass an actual identity structure for the identity.

Change-Id: I0930520c8329100ba27aa6db0d977dfcd8a097c1
Signed-off-by: Zane Bitter <zbitter@redhat.com>
heat/tests/test_rpc_client.py

index 9fa29ff5a441ad21b4bfd0c22b486f1d197c8b5e..61abfc7ca1c52d4d57f7859ca48963cdeae0ed81 100644 (file)
@@ -24,6 +24,7 @@ from nose.plugins.attrib import attr
 import unittest
 
 from heat.common import context
+from heat.common import identifier
 from heat.rpc import client as rpc_client
 from heat.openstack.common import cfg
 from heat.openstack.common import rpc
@@ -41,6 +42,9 @@ class EngineRpcAPITestCase(unittest.TestCase):
         cfg.CONF.set_default('host', 'host')
 
         self.stubs = stubout.StubOutForTesting()
+        self.identity = dict(identifier.HeatIdentifier('engine_test_tenant',
+                                                       '6',
+                                                       'wordpress'))
         super(EngineRpcAPITestCase, self).setUp()
 
     def tearDown(self):
@@ -95,7 +99,7 @@ class EngineRpcAPITestCase(unittest.TestCase):
 
     def test_update_stack(self):
         self._test_engine_api('update_stack', 'call',
-                              stack_identity='wordpress',
+                              stack_identity=self.identity,
                               template={u'Foo': u'bar'},
                               params={u'InstanceType': u'm1.xlarge'},
                               args={})
@@ -106,34 +110,34 @@ class EngineRpcAPITestCase(unittest.TestCase):
 
     def test_get_template(self):
         self._test_engine_api('get_template', 'call',
-                              stack_identity='wordpress')
+                              stack_identity=self.identity)
 
     def test_delete_stack_cast(self):
         self._test_engine_api('delete_stack', 'cast',
-                              stack_identity='wordpress')
+                              stack_identity=self.identity)
 
     def test_delete_stack_call(self):
         self._test_engine_api('delete_stack', 'call',
-                              stack_identity='wordpress')
+                              stack_identity=self.identity)
 
     def test_list_events(self):
         self._test_engine_api('list_events', 'call',
-                              stack_identity='wordpress')
+                              stack_identity=self.identity)
 
     def test_describe_stack_resource(self):
         self._test_engine_api('describe_stack_resource', 'call',
-                              stack_identity='wordpress',
+                              stack_identity=self.identity,
                               resource_name='LogicalResourceId')
 
     def test_describe_stack_resources(self):
         self._test_engine_api('describe_stack_resources', 'call',
-                              stack_identity='wordpress',
+                              stack_identity=self.identity,
                               physical_resource_id=u'404d-a85b-5315293e67de',
                               logical_resource_id=u'WikiDatabase')
 
     def test_list_stack_resources(self):
         self._test_engine_api('list_stack_resources', 'call',
-                              stack_identity='wordpress')
+                              stack_identity=self.identity)
 
     def test_metadata_update(self):
         self._test_engine_api('metadata_update', 'call',