def setup(self):
        super(TestCatalogController, self).setup()
        self.controller = CatalogController(self._db)

        # The collection as it exists on the circulation manager.
        remote_collection = self._collection(username='******',
                                             external_account_id=self._url)
        # The collection as it is recorded / catalogued here.
        self.collection = self._collection(
            name=remote_collection.metadata_identifier,
            protocol=remote_collection.protocol)

        self.work1 = self._work(with_license_pool=True,
                                with_open_access_download=True)
        self.work2 = self._work(with_license_pool=True,
                                with_open_access_download=True)
Exemple #2
0
def register():
    return CatalogController(app._db).register()
Exemple #3
0
def remove(collection_metadata_identifier):
    return CatalogController(app._db).remove_items(
        collection_details=collection_metadata_identifier)
Exemple #4
0
def updates(collection_metadata_identifier):
    return CatalogController(app._db).updates_feed(
        collection_details=collection_metadata_identifier)
Exemple #5
0
def metadata_needed_for(collection_metadata_identifier):
    return CatalogController(app._db).metadata_needed_for(
        collection_details=collection_metadata_identifier)
Exemple #6
0
def add_with_metadata(collection_metadata_identifier):
    return CatalogController(app._db).add_with_metadata(
        collection_details=collection_metadata_identifier)
Exemple #7
0
def update_url():
    return CatalogController(Conf.db).update_client_url()
Exemple #8
0
def add(collection_metadata_identifier):
    return CatalogController(Conf.db).add_items(
        collection_details=collection_metadata_identifier
    )