Merge "Hide warning for old style attribute schema test"
This commit is contained in:
commit
7d7621bbec
@ -11,6 +11,7 @@
|
|||||||
# License for the specific language governing permissions and limitations
|
# License for the specific language governing permissions and limitations
|
||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
|
import mock
|
||||||
import testtools
|
import testtools
|
||||||
|
|
||||||
from heat.engine import attributes
|
from heat.engine import attributes
|
||||||
@ -59,11 +60,12 @@ class AttributeSchemaTest(testtools.TestCase):
|
|||||||
attrs._attributes['bar_dep'].support_status().message)
|
attrs._attributes['bar_dep'].support_status().message)
|
||||||
|
|
||||||
def test_old_attribute_schema_format(self):
|
def test_old_attribute_schema_format(self):
|
||||||
s = 'Test description.'
|
with mock.patch('heat.engine.attributes.warnings'):
|
||||||
self.assertIsInstance(attributes.Schema.from_attribute(s),
|
s = 'Test description.'
|
||||||
attributes.Schema)
|
self.assertIsInstance(attributes.Schema.from_attribute(s),
|
||||||
self.assertEqual('Test description.',
|
attributes.Schema)
|
||||||
attributes.Schema.from_attribute(s).description)
|
self.assertEqual('Test description.',
|
||||||
|
attributes.Schema.from_attribute(s).description)
|
||||||
|
|
||||||
|
|
||||||
class AttributeTest(common.HeatTestCase):
|
class AttributeTest(common.HeatTestCase):
|
||||||
|
Loading…
Reference in New Issue
Block a user