# which accompanies this distribution, and is available at
# http://www.apache.org/licenses/LICENSE-2.0
+# pylint: disable=missing-docstring
+
import logging
import unittest
class TierHandlerTesting(unittest.TestCase):
- logging.disable(logging.CRITICAL)
-
def setUp(self):
self.test = mock.Mock()
attrs = {'get_name.return_value': 'test_name'}
'test_ci_loop',
description='test_desc')
self.testcase = tier_handler.TestCase('test_name',
+ 'true',
self.mock_depend,
'test_criteria',
'test_blocking',
- 'test_clean_flag',
description='test_desc')
self.dependency = tier_handler.Dependency('test_installer',
self.assertEqual(self.tier.get_ci_loop(),
'test_ci_loop')
- def test_testcase_is_none_present_item(self):
+ def test_testcase_is_none_in_item(self):
self.assertEqual(tier_handler.TestCase.is_none("item"),
False)
- def test_testcase_is_none_missing_item(self):
+ def test_testcase_is_none_no_item(self):
self.assertEqual(tier_handler.TestCase.is_none(None),
True)
'test_scenario'),
True)
- def test_testcase_is_compatible_missing_installer_scenario(self):
+ def test_testcase_is_compatible_2(self):
self.assertEqual(self.testcase.is_compatible('missing_installer',
'test_scenario'),
False)
self.assertEqual(self.tier.get_name(),
'test_tier')
+ def test_testcase_is_enabled(self):
+ self.assertEqual(self.testcase.is_enabled(),
+ 'true')
+
def test_testcase_get_criteria(self):
self.assertEqual(self.tier.get_order(),
'test_order')
if __name__ == "__main__":
+ logging.disable(logging.CRITICAL)
unittest.main(verbosity=2)