Merge "Hide deprecate warnings for metadata tests"

This commit is contained in:
Jenkins 2014-06-23 13:42:48 +00:00 committed by Gerrit Code Review
commit 0911d96dcc

View File

@ -52,6 +52,9 @@ class ResourceTest(HeatTestCase):
self.stack = parser.Stack(utils.dummy_context(), 'test_stack',
parser.Template(empty_template), env=env,
stack_id=str(uuid.uuid4()))
self.mock_warnings = mock.patch('heat.engine.resource.warnings')
self.mock_warnings.start()
self.addCleanup(self.mock_warnings.stop)
def test_get_class_ok(self):
cls = resource.get_class('GenericResourceType')
@ -781,6 +784,9 @@ class ResourceAdoptTest(HeatTestCase):
super(ResourceAdoptTest, self).setUp()
resource._register_class('GenericResourceType',
generic_rsrc.GenericResource)
self.mock_warnings = mock.patch('heat.engine.resource.warnings')
self.mock_warnings.start()
self.addCleanup(self.mock_warnings.stop)
def test_adopt_resource_success(self):
adopt_data = '{}'
@ -1354,6 +1360,9 @@ class MetadataTest(HeatTestCase):
scheduler.TaskRunner(self.res.create)()
self.addCleanup(self.stack.delete)
self.mock_warnings = mock.patch('heat.engine.resource.warnings')
self.mock_warnings.start()
self.addCleanup(self.mock_warnings.stop)
def test_read_initial(self):
self.assertEqual({'Test': 'Initial metadata'}, self.res.metadata_get())