本文整理汇总了Python中pulp.devel.mock_plugins.install函数的典型用法代码示例。如果您正苦于以下问题:Python install函数的具体用法?Python install怎么用?Python install使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了install函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: 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()
示例2: setUp
def setUp(self):
super(RepoConfigConduitTests, 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', {"relative_url": "/a/bc/d"},
True, distributor_id='dist-1')
self.distributor_manager.add_distributor('repo-1', 'mock-distributor', {"relative_url": "/a/c"},
True, distributor_id='dist-2')
self.repo_manager.create_repo('repo-2')
self.distributor_manager.add_distributor('repo-2', 'mock-distributor', {"relative_url": "/a/bc/e"},
True, distributor_id='dist-3')
self.repo_manager.create_repo('repo-3')
self.distributor_manager.add_distributor('repo-3', 'mock-distributor', {},
True, distributor_id='dist-4')
self.repo_manager.create_repo('repo-4')
self.distributor_manager.add_distributor('repo-4', 'mock-distributor', {"relative_url": "/repo-5"},
True, distributor_id='dist-5')
self.conduit = RepoConfigConduit('rpm')
示例3: setUp
def setUp(self):
super(RepoConfigConduitTests, self).setUp()
mock_plugins.install()
manager_factory.initialize()
self.distributor_manager = manager_factory.repo_distributor_manager()
with mock.patch("pulp.server.managers.repo.distributor.model.Repository.objects"):
# Populate the database with a repo with units
self.distributor_manager.add_distributor(
"repo-1", "mock-distributor", {"relative_url": "/a/bc/d"}, True, distributor_id="dist-1"
)
self.distributor_manager.add_distributor(
"repo-1", "mock-distributor", {"relative_url": "/a/c"}, True, distributor_id="dist-2"
)
self.distributor_manager.add_distributor(
"repo-2", "mock-distributor", {"relative_url": "/a/bc/e"}, True, distributor_id="dist-3"
)
self.distributor_manager.add_distributor("repo-3", "mock-distributor", {}, True, distributor_id="dist-4")
self.distributor_manager.add_distributor(
"repo-4", "mock-distributor", {"relative_url": "repo-5"}, True, distributor_id="dist-5"
)
self.distributor_manager.add_distributor(
"repo-5", "mock-distributor", {"relative_url": "a/bcd/e"}, True, distributor_id="dist-1"
)
self.distributor_manager.add_distributor(
"repo-6", "mock-distributor", {"relative_url": "a/bcde/f/"}, True, distributor_id="dist-1"
)
self.conduit = RepoConfigConduit("rpm")
示例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)
示例5: 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()
示例6: setUp
def setUp(self):
super(RepoConfigConduitTests, self).setUp()
mock_plugins.install()
manager_factory.initialize()
with mock.patch('pulp.server.controllers.distributor.model.Repository.objects'):
# Populate the database with a repo with units
dist_controller.add_distributor(
'repo-1', 'mock-distributor', {"relative_url": "/a/bc/d"}, True,
distributor_id='dist-1')
dist_controller.add_distributor(
'repo-1', 'mock-distributor', {"relative_url": "/a/c"}, True,
distributor_id='dist-2')
dist_controller.add_distributor(
'repo-2', 'mock-distributor', {"relative_url": "/a/bc/e"}, True,
distributor_id='dist-3')
dist_controller.add_distributor(
'repo-3', 'mock-distributor', {}, True, distributor_id='dist-4')
dist_controller.add_distributor(
'repo-4', 'mock-distributor', {"relative_url": "repo-5"}, True,
distributor_id='dist-5')
dist_controller.add_distributor(
'repo-5', 'mock-distributor', {"relative_url": "a/bcd/e"}, True,
distributor_id='dist-1')
dist_controller.add_distributor(
'repo-6', 'mock-distributor', {"relative_url": "a/bcde/f/"}, True,
distributor_id='dist-1')
self.conduit = RepoConfigConduit('rpm')
示例7: 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()
示例8: 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()
示例9: setUp
def setUp(self):
super(ConsumerTest, self).setUp()
Consumer.get_collection().remove(safe=True)
Repo.get_collection().remove(safe=True)
RepoDistributor.get_collection().remove(safe=True)
Bind.get_collection().remove(safe=True)
plugin_api._create_manager()
mock_plugins.install()
示例10: 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()
示例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()
示例12: 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()
示例13: 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()
示例14: setUp
def setUp(self):
super(BindManagerTests, self).setUp()
Consumer.get_collection().remove()
model.Distributor.objects.delete()
Bind.get_collection().remove()
ConsumerHistoryEvent.get_collection().remove()
plugin_api._create_manager()
mock_plugins.install()
示例15: setUp
def setUp(self):
PulpItineraryTests.setUp(self)
Consumer.get_collection().remove()
Repo.get_collection().remove()
RepoDistributor.get_collection().remove()
Bind.get_collection().remove()
plugin_api._create_manager()
mock_plugins.install()
mock_agent.install()