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")
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")
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")
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")
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")
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")
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")
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")