Пример #1
0
class TestBaseInstaller(unittest2.TestCase):
    """Test base installer."""
    def setUp(self):
        super(TestBaseInstaller, self).setUp()
        self.test_installer = BaseInstaller()

    def tearDown(self):
        super(TestBaseInstaller, self).tearDown()
        del self.test_installer

    def test_get_tmpl_vars_from_metadata(self):
        test_cases = config_data.metadata_test_cases
        for case in test_cases:
            metadata = case["metadata"]
            config = case["config"]
            expected_output = case["expected_output"]

            output = self.test_installer.get_tmpl_vars_from_metadata(
                metadata, config
            )

            self.maxDiff = None
            self.assertDictEqual(expected_output, output)
Пример #2
0
class TestBaseInstaller(unittest2.TestCase):
    """Test base installer."""
    def setUp(self):
        super(TestBaseInstaller, self).setUp()
        self.test_installer = BaseInstaller()

    def tearDown(self):
        super(TestBaseInstaller, self).tearDown()
        del self.test_installer

    def test_get_tmpl_vars_from_metadata(self):
        test_cases = config_data.metadata_test_cases
        for case in test_cases:
            metadata = case["metadata"]
            config = case["config"]
            expected_output = case["expected_output"]

            output = self.test_installer.get_tmpl_vars_from_metadata(
                metadata, config
            )

            self.maxDiff = None
            self.assertDictEqual(expected_output, output)
Пример #3
0
 def setUp(self):
     super(TestBaseInstaller, self).setUp()
     self.test_installer = BaseInstaller()
Пример #4
0
 def setUp(self):
     super(TestBaseInstaller, self).setUp()
     self.test_installer = BaseInstaller()