当前位置: 首页>>代码示例>>Python>>正文


Python MigrationModule._migrate_reply_queue方法代码示例

本文整理汇总了Python中pulp.server.db.migrate.models.MigrationModule._migrate_reply_queue方法的典型用法代码示例。如果您正苦于以下问题:Python MigrationModule._migrate_reply_queue方法的具体用法?Python MigrationModule._migrate_reply_queue怎么用?Python MigrationModule._migrate_reply_queue使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在pulp.server.db.migrate.models.MigrationModule的用法示例。


在下文中一共展示了MigrationModule._migrate_reply_queue方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: test_migrate_reply_queue_not_found_does_not_delete_or_add_reply_queue

# 需要导入模块: from pulp.server.db.migrate.models import MigrationModule [as 别名]
# 或者: from pulp.server.db.migrate.models.MigrationModule import _migrate_reply_queue [as 别名]
    def test_migrate_reply_queue_not_found_does_not_delete_or_add_reply_queue(self):
        fake_broker = Mock()
        fake_broker.getQueue.return_value = None

        # test
        migration = MigrationModule(MIGRATION)._module
        migration._migrate_reply_queue(fake_broker)

        # validation
        fake_broker.getQueue.assert_called_with(Services.REPLY_QUEUE)
        self.assertTrue(not self.mock_del_queue_catch_queue_in_use_exc.called)
        self.assertTrue(not fake_broker.addQueue.called)
开发者ID:ipanova,项目名称:pulp,代码行数:14,代码来源:test_0009_qpid_queues.py

示例2: test_migrate_reply_queue_not_found

# 需要导入模块: from pulp.server.db.migrate.models import MigrationModule [as 别名]
# 或者: from pulp.server.db.migrate.models.MigrationModule import _migrate_reply_queue [as 别名]
    def test_migrate_reply_queue_not_found(self):
        fake_queue = Mock()
        fake_broker = Mock()
        fake_broker.getQueue.return_value = None

        # test
        migration = MigrationModule(MIGRATION)._module
        migration._migrate_reply_queue(fake_broker)

        # validation
        fake_broker.getQueue.assert_called_with(Services.REPLY_QUEUE)
        self.assertFalse(fake_broker.called)
        self.assertFalse(fake_broker.called)
开发者ID:jbennett7,项目名称:pulp,代码行数:15,代码来源:test_migration_0009.py

示例3: test_migrate_reply_queue

# 需要导入模块: from pulp.server.db.migrate.models import MigrationModule [as 别名]
# 或者: from pulp.server.db.migrate.models.MigrationModule import _migrate_reply_queue [as 别名]
    def test_migrate_reply_queue(self):
        fake_queue = Mock()
        fake_queue.values = {
            'exclusive': True,
            'arguments': {}
        }
        fake_broker = Mock()
        fake_broker.getQueue.return_value = fake_queue

        # test
        migration = MigrationModule(MIGRATION)._module
        migration._migrate_reply_queue(fake_broker)

        # validation
        fake_broker.getQueue.assert_called_with(Services.REPLY_QUEUE)
        fake_broker.delQueue.assert_called_with(Services.REPLY_QUEUE)
        fake_broker.addQueue.assert_called_with(Services.REPLY_QUEUE, durable=True)
开发者ID:jbennett7,项目名称:pulp,代码行数:19,代码来源:test_migration_0009.py

示例4: test_migrate_reply_queue_not_exclusive

# 需要导入模块: from pulp.server.db.migrate.models import MigrationModule [as 别名]
# 或者: from pulp.server.db.migrate.models.MigrationModule import _migrate_reply_queue [as 别名]
    def test_migrate_reply_queue_not_exclusive(self):
        fake_queue = Mock()
        fake_queue.values = {
            'exclusive': False,
            'arguments': {}
        }
        fake_broker = Mock()
        fake_broker.getQueue.return_value = fake_queue

        # test
        migration = MigrationModule(MIGRATION)._module
        migration._migrate_reply_queue(fake_broker)

        # validation
        fake_broker.getQueue.assert_called_with(Services.REPLY_QUEUE)
        self.assertFalse(fake_broker.called)
        self.assertFalse(fake_broker.called)
开发者ID:jbennett7,项目名称:pulp,代码行数:19,代码来源:test_migration_0009.py

示例5: test_migrate_reply_queue_not_exclusive_does_not_delete_or_add_reply_queue

# 需要导入模块: from pulp.server.db.migrate.models import MigrationModule [as 别名]
# 或者: from pulp.server.db.migrate.models.MigrationModule import _migrate_reply_queue [as 别名]
    def test_migrate_reply_queue_not_exclusive_does_not_delete_or_add_reply_queue(self):
        fake_queue = Mock()
        fake_queue.values = {
            'exclusive': False,
            'arguments': {}
        }
        fake_broker = Mock()
        fake_broker.getQueue.return_value = fake_queue

        # test
        migration = MigrationModule(MIGRATION)._module
        migration._migrate_reply_queue(fake_broker)

        # validation
        fake_broker.getQueue.assert_called_with(Services.REPLY_QUEUE)
        self.assertTrue(not self.mock_del_queue_catch_queue_in_use_exc.called)
        self.assertTrue(not fake_broker.addQueue.called)
开发者ID:ipanova,项目名称:pulp,代码行数:19,代码来源:test_0009_qpid_queues.py

示例6: test_migrate_reply_queue_arguments_is_exclusive_deletes_and_add_reply_queue

# 需要导入模块: from pulp.server.db.migrate.models import MigrationModule [as 别名]
# 或者: from pulp.server.db.migrate.models.MigrationModule import _migrate_reply_queue [as 别名]
    def test_migrate_reply_queue_arguments_is_exclusive_deletes_and_add_reply_queue(self):
        fake_queue = Mock()
        fake_queue.values = {
            'exclusive': False,
            'arguments': {'exclusive': True}
        }
        fake_broker = Mock()
        fake_broker.getQueue.return_value = fake_queue

        # test
        migration = MigrationModule(MIGRATION)._module
        migration._migrate_reply_queue(fake_broker)

        # validation
        fake_broker.getQueue.assert_called_with(Services.REPLY_QUEUE)
        expected_call = call(fake_broker, Services.REPLY_QUEUE)
        self.mock_del_queue_catch_queue_in_use_exc.assert_has_calls(expected_call)
        fake_broker.addQueue.assert_called_with(Services.REPLY_QUEUE, durable=True)
开发者ID:ipanova,项目名称:pulp,代码行数:20,代码来源:test_0009_qpid_queues.py


注:本文中的pulp.server.db.migrate.models.MigrationModule._migrate_reply_queue方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。