• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Python mock_plugins.install函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Python中mock_plugins.install函数的典型用法代码示例。如果您正苦于以下问题:Python install函数的具体用法?Python install怎么用?Python install使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



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

示例1: setUp

    def setUp(self):
        base.PulpServerTests.setUp(self)
        mock_plugins.install()

        self.upload_manager = manager_factory.content_upload_manager()
        self.repo_manager = manager_factory.repo_manager()
        self.importer_manager = manager_factory.repo_importer_manager()
开发者ID:bartwo,项目名称:pulp,代码行数:7,代码来源:test_content_upload_manager.py


示例2: setUp

    def setUp(self):
        super(RepoGroupDistributorTests, self).setUp()

        mock_plugins.install()

        self.manager = manager_factory.repo_group_manager()
        self.distributor_manager = manager_factory.repo_group_distributor_manager()
开发者ID:ryanschneider,项目名称:pulp,代码行数:7,代码来源:test_repo_group_controller.py


示例3: setUp

    def setUp(self):
        super(RepoManagerTests, self).setUp()
        mock_plugins.install()

        # Create the manager instance to test
        self.repo_manager = repo_manager.RepoManager()
        self.importer_manager = importer_manager.RepoImporterManager()
开发者ID:ryanschneider,项目名称:pulp,代码行数:7,代码来源:test_repo_importer_manager.py


示例4: setUp

    def setUp(self):
        super(RepoUnitAssociationManagerTests, self).setUp()
        database.update_database([TYPE_1_DEF, TYPE_2_DEF, MOCK_TYPE_DEF])
        mock_plugins.install()

        self.manager = association_manager.RepoUnitAssociationManager()
        self.repo_manager = repo_manager.RepoManager()
        self.importer_manager = importer_manager.RepoImporterManager()
        self.content_manager = content_cud_manager.ContentManager()

        # Set up a valid configured repo for the tests
        self.repo_id = 'associate-repo'
        self.repo_manager.create_repo(self.repo_id)
        self.importer_manager.set_importer(self.repo_id, 'mock-importer', {})

        # Create units that can be associated to a repo
        self.unit_type_id = 'mock-type'

        self.unit_id = 'test-unit-id'
        self.unit_key = {'key-1' : 'test-unit'}
        self.content_manager.add_content_unit(self.unit_type_id, self.unit_id, self.unit_key)

        self.unit_id_2 = 'test-unit-id-2'
        self.unit_key_2 = {'key-1' : 'test-unit-2'}
        self.content_manager.add_content_unit(self.unit_type_id, self.unit_id_2, self.unit_key_2)
开发者ID:cliffy94,项目名称:pulp,代码行数:25,代码来源:test_repo_unit_association_manager.py


示例5: setUp

    def setUp(self):
        super(RepoDistributorManagerTests, self).setUp()
        mock_plugins.install()

        # Create the manager instance to test
        self.repo_manager = repo_manager.RepoManager()
        self.distributor_manager = distributor_manager.RepoDistributorManager()
开发者ID:bartwo,项目名称:pulp,代码行数:7,代码来源:test_repo_distributor_manager.py


示例6: setUp

    def setUp(self):
        super(RepoSyncManagerTests, self).setUp()
        mock_plugins.install()

        # Create the manager instances for testing
        self.repo_manager = repo_manager.RepoManager()
        self.distributor_manager = distributor_manager.RepoDistributorManager()
        self.publish_manager = publish_manager.RepoPublishManager()
开发者ID:cliffy94,项目名称:pulp,代码行数:8,代码来源:test_repo_publish_manager.py


示例7: setUp

    def setUp(self):
        super(RepoQueryManagerTests, self).setUp()
        mock_plugins.install()

        self.repo_manager = manager_factory.repo_manager()
        self.importer_manager = manager_factory.repo_importer_manager()
        self.distributor_manager = manager_factory.repo_distributor_manager()
        self.query_manager = manager_factory.repo_query_manager()
开发者ID:bartwo,项目名称:pulp,代码行数:8,代码来源:test_repo_query_manager.py


示例8: setUp

 def setUp(self):
     super(BindManagerTests, self).setUp()
     Consumer.get_collection().remove()
     Repo.get_collection().remove()
     RepoDistributor.get_collection().remove()
     Bind.get_collection().remove()
     plugin_api._create_manager()
     mock_plugins.install()
开发者ID:ehelms,项目名称:pulp,代码行数:8,代码来源:test_bind_manager.py


示例9: setUp

    def setUp(self):
        super(RepoManagerTests, self).setUp()

        plugin_api._create_manager()
        mock_plugins.install()

        # Create the manager instance to test
        self.manager = repo_manager.RepoManager()
开发者ID:ehelms,项目名称:pulp,代码行数:8,代码来源:test_repo_manager.py


示例10: setUp

 def setUp(self):
     super(ScheduledUnitInstallTests, self).setUp()
     plugin_api._create_manager()
     mock_plugins.install()
     mock_agent.install()
     self.consumer_id = 'test-consumer'
     self.consumer_manager = factory.consumer_manager()
     self.consumer_manager.register(self.consumer_id)
开发者ID:pkilambi,项目名称:pulp,代码行数:8,代码来源:test_consumer_controller.py


示例11: setUp

    def setUp(self):
        super(RepoSyncManagerTests, self).setUp()
        mock_plugins.install()

        # Create the manager instances for testing
        self.repo_manager = repo_manager.RepoManager()
        self.importer_manager = repo_importer_manager.RepoImporterManager()
        self.sync_manager = repo_sync_manager.RepoSyncManager()
开发者ID:ryanschneider,项目名称:pulp,代码行数:8,代码来源:test_repo_sync_manager.py


示例12: setUp

 def setUp(self):
     super(self.__class__, self).setUp()
     Consumer.get_collection().remove()
     ConsumerGroup.get_collection().remove()
     Repo.get_collection().remove()
     RepoDistributor.get_collection().remove()
     Bind.get_collection().remove()
     plugin_api._create_manager()
     mock_plugins.install()
开发者ID:cliffy94,项目名称:pulp,代码行数:9,代码来源:test_consumer_group_controller.py


示例13: setUp

    def setUp(self):
        super(RepoGroupDistributorManagerTests, self).setUp()
        mock_plugins.install()

        self.group_manager = manager_factory.repo_group_manager()
        self.distributor_manager = manager_factory.repo_group_distributor_manager()

        self.group_id = 'test-group'
        self.group_manager.create_repo_group(self.group_id)
开发者ID:bartwo,项目名称:pulp,代码行数:9,代码来源:test_repo_group_distributor_manager.py


示例14: setUp

    def setUp(self):
        super(ImporterScratchPadMixinTests, self).setUp()
        mock_plugins.install()

        self.repo_manager = RepoManager()
        self.importer_manager = RepoImporterManager()

        self.repo_id = 'repo-1'
        self.repo_manager.create_repo(self.repo_id)
        self.conduit = ImporterScratchPadMixin(self.repo_id, 'test-importer')
开发者ID:bartwo,项目名称:pulp,代码行数:10,代码来源:test_importer_scratchpad_mixin.py


示例15: setUp

 def setUp(self):
     base.PulpServerTests.setUp(self)
     Consumer.get_collection().remove()
     UnitProfile.get_collection().remove()
     plugins._create_manager()
     mock_plugins.install()
     profiler, cfg = plugins.get_profiler_by_type('rpm')
     profiler.units_applicable = \
         Mock(side_effect=lambda i,r,t,u,c,x:
              [ApplicabilityReport('mysummary', 'mydetails')])
开发者ID:domcleal,项目名称:pulp,代码行数:10,代码来源:test_applicability_manager.py


示例16: setUp

 def setUp(self):
     super(BaseProfilerConduitTests, self).setUp()
     Consumer.get_collection().remove()
     Repo.get_collection().remove()
     RepoDistributor.get_collection().remove()
     Bind.get_collection().remove()
     RepoContentUnit.get_collection().remove()
     UnitProfile.get_collection().remove()
     plugin_api._create_manager()
     typedb.update_database([self.TYPE_1_DEF, self.TYPE_2_DEF])
     mock_plugins.install()
开发者ID:domcleal,项目名称:pulp,代码行数:11,代码来源:test_profiler_conduit.py


示例17: setUp

    def setUp(self):
        super(RepoUnitAssociationManagerTests, self).setUp()
        database.update_database([TYPE_1_DEF, TYPE_2_DEF, MOCK_TYPE_DEF])
        mock_plugins.install()
        # so we don't try to refresh the unit count on non-existing repos
        manager_factory._CLASSES[manager_factory.TYPE_REPO] = mock.MagicMock()

        self.manager = association_manager.RepoUnitAssociationManager()
        self.repo_manager = repo_manager.RepoManager()
        self.importer_manager = importer_manager.RepoImporterManager()
        self.content_manager = content_cud_manager.ContentManager()
开发者ID:stpierre,项目名称:pulp,代码行数:11,代码来源:test_repo_unit_association_manager.py


示例18: setUp

    def setUp(self):
        super(DependencyManagerTests, self).setUp()

        mock_plugins.install()

        database.update_database([TYPE_1_DEF])

        self.repo_id = 'dep-repo'
        self.manager = manager_factory.dependency_manager()

        manager_factory.repo_manager().create_repo(self.repo_id)
        manager_factory.repo_importer_manager().set_importer(self.repo_id, 'mock-importer', {})
开发者ID:bartwo,项目名称:pulp,代码行数:12,代码来源:test_dependency_manager.py


示例19: setUp

    def setUp(self):
        super(RepoGroupPublishManagerTests, self).setUp()
        mock_plugins.install()

        self.group_manager = manager_factory.repo_group_manager()
        self.distributor_manager = manager_factory.repo_group_distributor_manager()
        self.publish_manager = manager_factory.repo_group_publish_manager()

        self.group_id = 'publish-group'
        self.group_manager.create_repo_group(self.group_id)

        self.distributor_id = 'publish-dist'
        self.distributor_manager.add_distributor(self.group_id, 'mock-group-distributor', {}, distributor_id=self.distributor_id)
开发者ID:bartwo,项目名称:pulp,代码行数:13,代码来源:test_repo_group_publish_manager.py


示例20: setUp

    def setUp(self):
        super(RepoPublishConduitTests, self).setUp()
        mock_plugins.install()
        manager_factory.initialize()

        self.repo_manager = manager_factory.repo_manager()
        self.distributor_manager = manager_factory.repo_distributor_manager()

        # Populate the database with a repo with units
        self.repo_manager.create_repo('repo-1')
        self.distributor_manager.add_distributor('repo-1', 'mock-distributor', {}, True, distributor_id='dist-1')

        self.conduit = RepoPublishConduit('repo-1', 'dist-1')
开发者ID:bartwo,项目名称:pulp,代码行数:13,代码来源:test_repo_publish_conduit.py



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Python mock_plugins.reset函数代码示例发布时间:2022-05-27
下一篇:
Python mock_helper.import_data函数代码示例发布时间:2022-05-27
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap