本文整理汇总了Python中subscription_manager.repolib.Repo.keys方法的典型用法代码示例。如果您正苦于以下问题:Python Repo.keys方法的具体用法?Python Repo.keys怎么用?Python Repo.keys使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类subscription_manager.repolib.Repo
的用法示例。
在下文中一共展示了Repo.keys方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_set_immutable_property_now_empty
# 需要导入模块: from subscription_manager.repolib import Repo [as 别名]
# 或者: from subscription_manager.repolib.Repo import keys [as 别名]
def test_set_immutable_property_now_empty(self):
self._inject_mock_invalid_consumer()
update_action = RepoUpdateActionCommand()
existing_repo = Repo('testrepo')
existing_repo['proxy_username'] = "blah"
incoming_repo = {}
update_action.update_repo(existing_repo, incoming_repo)
self.assertFalse("proxy_username" in list(existing_repo.keys()))
示例2: test_set_immutable_property_now_not_in_cert
# 需要导入模块: from subscription_manager.repolib import Repo [as 别名]
# 或者: from subscription_manager.repolib.Repo import keys [as 别名]
def test_set_immutable_property_now_not_in_cert(self):
self._inject_mock_invalid_consumer()
update_action = RepoUpdateActionCommand()
existing_repo = Repo('testrepo')
existing_repo['proxy_username'] = "blah"
incoming_repo = {}
update_action.update_repo(existing_repo, incoming_repo)
# Immutable properties should be always be added/updated,
# and removed if undefined in the new repo definition.
self.assertFalse("proxy_username" in list(existing_repo.keys()))
示例3: test_set_mutable_property_now_not_in_cert
# 需要导入模块: from subscription_manager.repolib import Repo [as 别名]
# 或者: from subscription_manager.repolib.Repo import keys [as 别名]
def test_set_mutable_property_now_not_in_cert(self):
self._inject_mock_invalid_consumer()
update_action = RepoUpdateActionCommand()
existing_repo = Repo('testrepo')
existing_repo['metadata_expire'] = "blah"
incoming_repo = {}
update_action.update_repo(existing_repo, incoming_repo)
# re comments in repolib
# Mutable properties should be added if not currently defined,
# otherwise left alone.
self.assertTrue("metadata_expire" in list(existing_repo.keys()))
示例4: test_set_immutable_property_now_empty
# 需要导入模块: from subscription_manager.repolib import Repo [as 别名]
# 或者: from subscription_manager.repolib.Repo import keys [as 别名]
def test_set_immutable_property_now_empty(self):
existing_repo = Repo('testrepo')
existing_repo['proxy_username'] = "blah"
incoming_repo = {}
existing_repo.update(incoming_repo)
self.assertFalse("proxy_username" in existing_repo.keys())