本文整理汇总了Python中pulp.server.managers.consumer.agent.AgentManager.delete_queue方法的典型用法代码示例。如果您正苦于以下问题:Python AgentManager.delete_queue方法的具体用法?Python AgentManager.delete_queue怎么用?Python AgentManager.delete_queue使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类pulp.server.managers.consumer.agent.AgentManager
的用法示例。
在下文中一共展示了AgentManager.delete_queue方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_delete_queue_still_registered
# 需要导入模块: from pulp.server.managers.consumer.agent import AgentManager [as 别名]
# 或者: from pulp.server.managers.consumer.agent.AgentManager import delete_queue [as 别名]
def test_delete_queue_still_registered(self, agent, consumer_manager):
url = 'test-url'
queue = 'test-queue'
consumer_id = 'test-consumer'
# test
AgentManager.delete_queue(url, queue, consumer_id)
# validation
consumer_manager.assert_called_once_with()
consumer_manager = consumer_manager.return_value
consumer_manager.get_consumer.assert_called_once_with(consumer_id)
self.assertFalse(agent.called)
示例2: test_delete_queue
# 需要导入模块: from pulp.server.managers.consumer.agent import AgentManager [as 别名]
# 或者: from pulp.server.managers.consumer.agent.AgentManager import delete_queue [as 别名]
def test_delete_queue(self, agent, consumer_manager):
url = 'test-url'
queue = 'test-queue'
consumer_id = 'test-consumer'
consumer_manager.return_value.get_consumer.side_effect = MissingResource
# test
AgentManager.delete_queue(url, queue, consumer_id)
# validation
consumer_manager.assert_called_once_with()
consumer_manager = consumer_manager.return_value
consumer_manager.get_consumer.assert_called_once_with(consumer_id)
agent.assert_called_once_with()
agent = agent.return_value
agent.delete_queue.assert_called_once_with(url, queue)