本文整理汇总了Python中config.configmanager.ConfigManager.get_framework_config方法的典型用法代码示例。如果您正苦于以下问题:Python ConfigManager.get_framework_config方法的具体用法?Python ConfigManager.get_framework_config怎么用?Python ConfigManager.get_framework_config使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类config.configmanager.ConfigManager
的用法示例。
在下文中一共展示了ConfigManager.get_framework_config方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_get_config_framework
# 需要导入模块: from config.configmanager import ConfigManager [as 别名]
# 或者: from config.configmanager.ConfigManager import get_framework_config [as 别名]
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")
示例2: test_get_config_framework
# 需要导入模块: from config.configmanager import ConfigManager [as 别名]
# 或者: from config.configmanager.ConfigManager import get_framework_config [as 别名]
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")
示例3: test_check
# 需要导入模块: from config.configmanager import ConfigManager [as 别名]
# 或者: from config.configmanager.ConfigManager import get_framework_config [as 别名]
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")
示例4: test_set_config_path
# 需要导入模块: from config.configmanager import ConfigManager [as 别名]
# 或者: from config.configmanager.ConfigManager import get_framework_config [as 别名]
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")