本文整理汇总了Python中subscription_manager.repolib.YumReleaseverSource._expansion方法的典型用法代码示例。如果您正苦于以下问题:Python YumReleaseverSource._expansion方法的具体用法?Python YumReleaseverSource._expansion怎么用?Python YumReleaseverSource._expansion使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类subscription_manager.repolib.YumReleaseverSource
的用法示例。
在下文中一共展示了YumReleaseverSource._expansion方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_mem_cache_pre_cached
# 需要导入模块: from subscription_manager.repolib import YumReleaseverSource [as 别名]
# 或者: from subscription_manager.repolib.YumReleaseverSource import _expansion [as 别名]
def test_mem_cache_pre_cached(self):
inj.provide(inj.RELEASE_STATUS_CACHE, Mock())
release_mock = inj.require(inj.RELEASE_STATUS_CACHE)
release = "MockServer"
mock_release = {'releaseVer': release}
release_mock.read_status = Mock(return_value=mock_release)
release_source = YumReleaseverSource()
cached_release = "CachedMockServer"
release_source._expansion = cached_release
exp = release_source.get_expansion()
self.assertEqual(exp, cached_release)
self.assertEqual(release_source._expansion, cached_release)