Esempio n. 1
0
 def setUp(self):
     super(GetUnitsByTypeStressTest, self).setUp()
     database.update_database(_QUERY_TYPES)
     self.manager = association_query_manager.RepoUnitAssociationQueryManager(
     )
     self.association_manager = association_query_manager.RepoUnitAssociationQueryManager(
     )
     self.content_manager = content_cud_manager.ContentManager()
 def setUp(self):
     super(UnitAssociationQueryTests, self).setUp()
     database.update_database(_QUERY_TYPES)
     self.manager = association_query_manager.RepoUnitAssociationQueryManager()
     self.association_manager = association_manager.RepoUnitAssociationManager()
     self.content_manager = content_cud_manager.ContentManager()
     self._populate()
Esempio n. 3
0
 def setUp(self):
     super(UnitAssociationQueryTests, self).setUp()
     database.update_database(_QUERY_TYPES)
     self.manager = association_query_manager.RepoUnitAssociationQueryManager()
     self.association_manager = association_manager.RepoUnitAssociationManager()
     self.content_manager = content_cud_manager.ContentManager()
     # so we don't try to refresh the unit count on non-existing repos
     manager_factory._CLASSES[manager_factory.TYPE_REPO] = mock.MagicMock()
     self._populate()
Esempio n. 4
0
    def setUp(self, mock_repo_qs, mock_imp_qs, mock_remove):
        super(RepoSyncConduitTests, self).setUp()
        mock_plugins.install()
        types_database.update_database([TYPE_1_DEF, TYPE_2_DEF])

        self.association_manager = association_manager.RepoUnitAssociationManager()
        self.association_query_manager = association_query_manager.RepoUnitAssociationQueryManager()
        self.content_manager = content_manager.ContentManager()
        self.query_manager = query_manager.ContentQueryManager()

        self.conduit = RepoSyncConduit('repo-1', 'test-importer', 'abc123')
        importer_controller.set_importer('repo-1', 'mock-importer', {})
Esempio n. 5
0
    def setUp(self):
        super(RepoSyncConduitTests, self).setUp()
        mock_plugins.install()
        types_database.update_database([TYPE_1_DEF, TYPE_2_DEF])

        self.repo_manager = repo_manager.RepoManager()
        self.importer_manager = importer_manager.RepoImporterManager()
        self.sync_manager = sync_manager.RepoSyncManager()
        self.association_manager = association_manager.RepoUnitAssociationManager()
        self.association_query_manager = association_query_manager.RepoUnitAssociationQueryManager()
        self.content_manager = content_manager.ContentManager()
        self.query_manager = query_manager.ContentQueryManager()

        self.repo_manager.create_repo('repo-1')
        self.importer_manager.set_importer('repo-1', 'mock-importer', {})
        self.conduit = RepoSyncConduit('repo-1', 'test-importer', 'importer', 'importer-id')