Merge "Check all available support statuses"

This commit is contained in:
Jenkins 2015-03-17 15:02:28 +00:00 committed by Gerrit Code Review
commit 0a0f7c9389

View File

@ -17,19 +17,20 @@ from heat.tests import common
class SupportStatusTest(common.HeatTestCase):
def test_valid_status(self):
status = support.SupportStatus(
status=support.DEPRECATED,
message='test_message',
version='test_version'
)
self.assertEqual('DEPRECATED', status.status)
self.assertEqual('test_message', status.message)
self.assertEqual('test_version', status.version)
self.assertEqual({
'status': 'DEPRECATED',
'message': 'test_message',
'version': 'test_version'
}, status.to_dict())
for sstatus in support.SUPPORT_STATUSES:
status = support.SupportStatus(
status=sstatus,
message='test_message',
version='test_version'
)
self.assertEqual(sstatus, status.status)
self.assertEqual('test_message', status.message)
self.assertEqual('test_version', status.version)
self.assertEqual({
'status': sstatus,
'message': 'test_message',
'version': 'test_version'
}, status.to_dict())
def test_invalid_status(self):
status = support.SupportStatus(