本文整理汇总了Python中pulp_puppet.plugins.importers.directory.SynchronizeWithDirectory._remove_missing方法的典型用法代码示例。如果您正苦于以下问题:Python SynchronizeWithDirectory._remove_missing方法的具体用法?Python SynchronizeWithDirectory._remove_missing怎么用?Python SynchronizeWithDirectory._remove_missing使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类pulp_puppet.plugins.importers.directory.SynchronizeWithDirectory
的用法示例。
在下文中一共展示了SynchronizeWithDirectory._remove_missing方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_remove_missing
# 需要导入模块: from pulp_puppet.plugins.importers.directory import SynchronizeWithDirectory [as 别名]
# 或者: from pulp_puppet.plugins.importers.directory.SynchronizeWithDirectory import _remove_missing [as 别名]
def test_remove_missing(self):
"""
Test that when there are units to remove, the conduit is called correctly.
"""
mock_unit = Mock()
mock_conduit = Mock()
method = SynchronizeWithDirectory(mock_conduit, {})
method._remove_missing([mock_unit], [])
mock_conduit.remove_unit.assert_called_once_with(mock_unit)
示例2: test_remove_missing_canceled
# 需要导入模块: from pulp_puppet.plugins.importers.directory import SynchronizeWithDirectory [as 别名]
# 或者: from pulp_puppet.plugins.importers.directory.SynchronizeWithDirectory import _remove_missing [as 别名]
def test_remove_missing_canceled(self):
"""
Test that when the sync is canceled, no units are removed.
"""
mock_unit = Mock()
mock_conduit = Mock()
method = SynchronizeWithDirectory(mock_conduit, {})
method.canceled = True
method._remove_missing([mock_unit], [])
self.assertEqual(0, mock_conduit.remove_unit.call_count)