本文整理汇总了Python中subscription_manager.repolib.RepoUpdateActionCommand.get_content方法的典型用法代码示例。如果您正苦于以下问题:Python RepoUpdateActionCommand.get_content方法的具体用法?Python RepoUpdateActionCommand.get_content怎么用?Python RepoUpdateActionCommand.get_content使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类subscription_manager.repolib.RepoUpdateActionCommand
的用法示例。
在下文中一共展示了RepoUpdateActionCommand.get_content方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_only_allow_content_of_type_yum
# 需要导入模块: from subscription_manager.repolib import RepoUpdateActionCommand [as 别名]
# 或者: from subscription_manager.repolib.RepoUpdateActionCommand import get_content [as 别名]
def test_only_allow_content_of_type_yum(self):
update_action = RepoUpdateActionCommand()
content = update_action.get_content(self.stub_ent_cert,
"http://example.com", None)
self.assertTrue(self._find_content(content, "c1") is not None)
self.assertTrue(self._find_content(content, "c5") is None)
self.assertTrue(self._find_content(content, "c6") is None)
示例2: test_gpg_key
# 需要导入模块: from subscription_manager.repolib import RepoUpdateActionCommand [as 别名]
# 或者: from subscription_manager.repolib.RepoUpdateActionCommand import get_content [as 别名]
def test_gpg_key(self):
update_action = RepoUpdateActionCommand()
content = update_action.get_content(self.stub_ent_cert,
"http://example.com", None)
c4 = self._find_content(content, 'c4')
self.assertEquals('http://example.com/gpg.key', c4['gpgkey'])
self.assertEquals('1', c4['gpgcheck'])
示例3: test_ui_repoid_vars
# 需要导入模块: from subscription_manager.repolib import RepoUpdateActionCommand [as 别名]
# 或者: from subscription_manager.repolib.RepoUpdateActionCommand import get_content [as 别名]
def test_ui_repoid_vars(self):
update_action = RepoUpdateActionCommand()
content = update_action.get_content(self.stub_ent_cert,
"http://example.com", None)
c4 = self._find_content(content, 'c4')
self.assertEquals('some path', c4['ui_repoid_vars'])
c2 = self._find_content(content, 'c2')
self.assertEquals(None, c2['ui_repoid_vars'])
示例4: test_no_gpg_key
# 需要导入模块: from subscription_manager.repolib import RepoUpdateActionCommand [as 别名]
# 或者: from subscription_manager.repolib.RepoUpdateActionCommand import get_content [as 别名]
def test_no_gpg_key(self):
update_action = RepoUpdateActionCommand()
content = update_action.get_content(self.stub_ent_cert,
"http://example.com", None)
c1 = self._find_content(content, 'c1')
self.assertEquals('', c1['gpgkey'])
self.assertEquals('0', c1['gpgcheck'])
c2 = self._find_content(content, 'c2')
self.assertEquals('', c2['gpgkey'])
self.assertEquals('0', c2['gpgcheck'])