コード例 #1
0
ファイル: test_sync.py プロジェクト: ipanova/pulp
 def tearDown(self):
     super(TestDoSync, self).tearDown()
     mock_plugins.reset()
     manager_factory.reset()
     Repo.get_collection().remove()
     RepoImporter.get_collection().remove()
     RepoSyncResult.get_collection().remove()
     MockRepoPublishManager.reset()
コード例 #2
0
ファイル: test_sync.py プロジェクト: beav/pulp
 def tearDown(self):
     super(TestDoSync, self).tearDown()
     mock_plugins.reset()
     manager_factory.reset()
     Repo.get_collection().remove()
     RepoImporter.get_collection().remove()
     RepoSyncResult.get_collection().remove()
     MockRepoPublishManager.reset()
コード例 #3
0
 def setUp(self):
     super(BaseTest, self).setUp()
     self._meta_path = sys.meta_path
     sys.meta_path = [ModuleFinder()] + sys.meta_path
     from pulp_snapshot.plugins.distributors import distributor
     self.Module = distributor
     self.Configuration = distributor.configuration
     self._confmock = mock.patch.dict(distributor.configuration.__dict__, )
     self._confmock.start()
     factory.reset()
コード例 #4
0
 def tearDown(self):
     super(BaseProfilerConduitTests, self).tearDown()
     Consumer.get_collection().remove()
     Repo.get_collection().remove()
     RepoDistributor.get_collection().remove()
     Bind.get_collection().remove()
     RepoContentUnit.get_collection().remove()
     UnitProfile.get_collection().remove()
     typedb.clean()
     factory.reset()
コード例 #5
0
 def tearDown(self):
     super(BaseProfilerConduitTests, self).tearDown()
     Consumer.get_collection().remove()
     Repo.get_collection().remove()
     RepoDistributor.get_collection().remove()
     Bind.get_collection().remove()
     RepoContentUnit.get_collection().remove()
     UnitProfile.get_collection().remove()
     typedb.clean()
     factory.reset()
コード例 #6
0
ファイル: test_profiler.py プロジェクト: taftsanders/pulp
 def tearDown(self):
     super(BaseProfilerConduitTests, self).tearDown()
     Consumer.get_collection().remove()
     model.Repository.objects.delete()
     model.Distributor.objects.delete()
     Bind.get_collection().remove()
     RepoContentUnit.get_collection().remove()
     UnitProfile.get_collection().remove()
     typedb.clean()
     factory.reset()
     mock_plugins.reset()
コード例 #7
0
ファイル: test_profiler.py プロジェクト: alanoe/pulp
 def tearDown(self):
     super(BaseProfilerConduitTests, self).tearDown()
     Consumer.get_collection().remove()
     model.Repository.objects.delete()
     model.Distributor.objects.delete()
     Bind.get_collection().remove()
     RepoContentUnit.get_collection().remove()
     UnitProfile.get_collection().remove()
     typedb.clean()
     factory.reset()
     mock_plugins.reset()
コード例 #8
0
ファイル: test_factory.py プロジェクト: credativ/pulp
    def test_register_and_reset(self):
        """
        Tests that registering a new class and resetting properly affects the
        class mappings.
        """

        # Setup
        class FakeManager:
            pass

        factory.register_manager(factory.TYPE_REPO, FakeManager)

        # Test Register
        manager = factory.get_manager(factory.TYPE_REPO)
        self.assertTrue(isinstance(manager, FakeManager))

        # Test Reset
        factory.reset()
        manager = factory.get_manager(factory.TYPE_REPO)
        self.assertTrue(isinstance(manager, RepoManager))
コード例 #9
0
ファイル: test_factory.py プロジェクト: pombreda/pulp
    def test_register_and_reset(self):
        """
        Tests that registering a new class and resetting properly affects the
        class mappings.
        """

        # Setup
        class FakeManager:
            pass

        factory.register_manager(factory.TYPE_REPO, FakeManager)

        # Test Register
        manager = factory.get_manager(factory.TYPE_REPO)
        self.assertTrue(isinstance(manager, FakeManager))

        # Test Reset
        factory.reset()
        manager = factory.get_manager(factory.TYPE_REPO)
        self.assertTrue(isinstance(manager, RepoManager))
コード例 #10
0
 def tearDown(self):
     super(UnitAssociationQueryTests, self).tearDown()
     manager_factory.reset()
コード例 #11
0
 def tearDown(self):
     super(RepoUnitAssociationManagerTests, self).tearDown()
     mock_plugins.reset()
     manager_factory.reset()
コード例 #12
0
ファイル: test_repo_sync_manager.py プロジェクト: sahwar/pulp
    def tearDown(self):
        super(RepoSyncManagerTests, self).tearDown()
        mock_plugins.reset()

        # Reset the manager factory
        manager_factory.reset()
コード例 #13
0
 def tearDown(self):
     super(DistributorScratchpadMixinTests, self).tearDown()
     manager_factory.reset()
     mock_plugins.reset()
コード例 #14
0
 def tearDown(self):
     super(DistributorScratchpadMixinTests, self).tearDown()
     manager_factory.reset()
コード例 #15
0
ファイル: test_sync.py プロジェクト: beav/pulp
    def tearDown(self):
        super(RepoSyncManagerTests, self).tearDown()
        mock_plugins.reset()

        # Reset the manager factory
        manager_factory.reset()
コード例 #16
0
ファイル: test_repositories.py プロジェクト: pombreda/pulp
 def clean(self):
     super(RepoUnitAssociationQueryTests, self).clean()
     manager_factory.reset()
コード例 #17
0
ファイル: test_factory.py プロジェクト: credativ/pulp
 def clean(self):
     factory.reset()
コード例 #18
0
 def tearDown(self):
     super(ImporterScratchPadMixinTests, self).tearDown()
     manager_factory.reset()
コード例 #19
0
 def tearDown(self):
     super(RepoUnitAssociationManagerTests, self).tearDown()
     mock_plugins.reset()
     manager_factory.reset()
コード例 #20
0
 def tearDown(self):
     super(UnitAssociationQueryTests, self).tearDown()
     manager_factory.reset()
コード例 #21
0
ファイル: test_factory.py プロジェクト: pombreda/pulp
 def clean(self):
     factory.reset()
コード例 #22
0
 def tearDown(self):
     super(ImporterScratchPadMixinTests, self).tearDown()
     manager_factory.reset()
     mock_plugins.reset()
コード例 #23
0
ファイル: test_repositories.py プロジェクト: pombreda/pulp
 def clean(self):
     super(RepoUnitAssociationQueryTests, self).clean()
     manager_factory.reset()