From 4660f0957120065b1dbb96dd30aa7a967fe7fa03 Mon Sep 17 00:00:00 2001 From: Sergey Kraynev Date: Fri, 30 May 2014 08:53:52 -0400 Subject: [PATCH] Hide warning for old style attribute schema test Change-Id: I6a3d0464bffe65f8ef7ab9006882cbeaa03cc20d --- heat/tests/test_attributes.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/heat/tests/test_attributes.py b/heat/tests/test_attributes.py index d263c3637..da673fc3f 100644 --- a/heat/tests/test_attributes.py +++ b/heat/tests/test_attributes.py @@ -11,6 +11,7 @@ # License for the specific language governing permissions and limitations # under the License. +import mock import testtools from heat.engine import attributes @@ -59,11 +60,12 @@ class AttributeSchemaTest(testtools.TestCase): attrs._attributes['bar_dep'].support_status().message) def test_old_attribute_schema_format(self): - s = 'Test description.' - self.assertIsInstance(attributes.Schema.from_attribute(s), - attributes.Schema) - self.assertEqual('Test description.', - attributes.Schema.from_attribute(s).description) + with mock.patch('heat.engine.attributes.warnings'): + s = 'Test description.' + self.assertIsInstance(attributes.Schema.from_attribute(s), + attributes.Schema) + self.assertEqual('Test description.', + attributes.Schema.from_attribute(s).description) class AttributeTest(common.HeatTestCase):