Ejemplo n.º 1
0
 def test_get_config_framework(self):
     """
     Tests the framework config
     :return: Tests results
     """
     data = ConfigManager.get_framework_config()
     self.assertEqual(True, (data is not None), "Wrong data")
Ejemplo n.º 2
0
 def test_get_config_framework(self):
     """
     Tests the framework config
     :return: Tests results
     """
     data = ConfigManager.get_framework_config()
     self.assertEqual(len(data), 6, "framework_config.yml: Wrong size of the List")
Ejemplo n.º 3
0
 def test_get_config_framework(self):
     """
     Tests the framework config
     :return: Tests results
     """
     data = ConfigManager.get_framework_config()
     self.assertEqual(True, (data is not None), "Wrong data")
Ejemplo n.º 4
0
 def test_check(self):
     """
     Test config vs. schema
     :return: Test results
     """
     data = ConfigManager.get_framework_config()
     result = ConfigManager.check(data)
     self.assertEqual(True, result, "Wrong schema or data")
Ejemplo n.º 5
0
 def test_get_config_framework(self):
     """
     Tests the framework config
     :return: Tests results
     """
     data = ConfigManager.get_framework_config()
     self.assertEqual(len(data), 6,
                      "framework_config.yml: Wrong size of the List")
Ejemplo n.º 6
0
 def test_check(self):
     """
     Test config vs. schema
     :return: Test results
     """
     data = ConfigManager.get_framework_config()
     result = ConfigManager.check(data)
     self.assertEqual(True, result, "Wrong schema or data")
Ejemplo n.º 7
0
    def test_set_config_path(self):
        """
        Tests to set the config path
        :return: Tests results
        """
        base_dir = path.dirname(path.dirname(__file__))  # This is your Project Root
        config_path = path.join(base_dir, 'framework_unittests/configs/config_no_vlan')
        ConfigManager.set_config_path(config_path)
        self.assertEqual(ConfigManager.CONFIG_PATH, config_path, "Wrong path")

        data = ConfigManager.get_framework_config()
        self.assertEqual((data is not None), True, "No data")

        config_path = path.join(base_dir, 'config')  # Join Project Root with config

        ConfigManager.set_config_path(config_path)
        self.assertEqual(ConfigManager.CONFIG_PATH, config_path, "Wrong path")
Ejemplo n.º 8
0
    def test_set_config_path(self):
        """
        Tests to set the config path
        :return: Tests results
        """
        base_dir = path.dirname(
            path.dirname(__file__))  # This is your Project Root
        config_path = path.join(base_dir,
                                'framework_unittests/configs/config_no_vlan')
        ConfigManager.set_config_path(config_path)
        self.assertEqual(ConfigManager.CONFIG_PATH, config_path, "Wrong path")

        data = ConfigManager.get_framework_config()
        self.assertEqual((data is not None), True, "No data")

        config_path = path.join(base_dir,
                                'config')  # Join Project Root with config

        ConfigManager.set_config_path(config_path)
        self.assertEqual(ConfigManager.CONFIG_PATH, config_path, "Wrong path")