本文整理汇总了Python中pulp_node.importers.http.importer.NodesHttpImporter.validate_config方法的典型用法代码示例。如果您正苦于以下问题:Python NodesHttpImporter.validate_config方法的具体用法?Python NodesHttpImporter.validate_config怎么用?Python NodesHttpImporter.validate_config使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类pulp_node.importers.http.importer.NodesHttpImporter
的用法示例。
在下文中一共展示了NodesHttpImporter.validate_config方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_config_missing_properties
# 需要导入模块: from pulp_node.importers.http.importer import NodesHttpImporter [as 别名]
# 或者: from pulp_node.importers.http.importer.NodesHttpImporter import validate_config [as 别名]
def test_config_missing_properties(self):
# Test
importer = NodesHttpImporter()
repo = plugin_model.Repository(self.REPO_ID)
report = importer.validate_config(repo, {})
# Verify
self.assertTrue(isinstance(report, tuple))
self.assertTrue(len(report), 2)
self.assertTrue(isinstance(report[0], bool))
self.assertFalse(report[0])
self.assertTrue(len(report[1]), 3)
示例2: test_valid_config
# 需要导入模块: from pulp_node.importers.http.importer import NodesHttpImporter [as 别名]
# 或者: from pulp_node.importers.http.importer.NodesHttpImporter import validate_config [as 别名]
def test_valid_config(self):
# Test
importer = NodesHttpImporter()
repo = plugin_model.Repository(self.REPO_ID)
report = importer.validate_config(repo, self.VALID_CONFIGURATION)
# Verify
self.assertTrue(isinstance(report, tuple))
self.assertTrue(len(report), 2)
self.assertTrue(isinstance(report[0], bool))
self.assertTrue(report[0])
self.assertEqual(len(report[1]), 0)
示例3: test_invalid_strategy
# 需要导入模块: from pulp_node.importers.http.importer import NodesHttpImporter [as 别名]
# 或者: from pulp_node.importers.http.importer.NodesHttpImporter import validate_config [as 别名]
def test_invalid_strategy(self):
# Test
conf = deepcopy(self.VALID_CONFIGURATION)
conf[constants.STRATEGY_KEYWORD] = '---',
importer = NodesHttpImporter()
repo = plugin_model.Repository(self.REPO_ID)
report = importer.validate_config(repo, conf)
# Verify
self.assertTrue(isinstance(report, tuple))
self.assertTrue(len(report), 2)
self.assertTrue(isinstance(report[0], bool))
self.assertFalse(report[0])
self.assertTrue(len(report[1]), 1)