def setup(self):
     super(TestCirculationAPI, self).setup()
     self.collection = MockBibliothecaAPI.mock_collection(self._db)
     edition, self.pool = self._edition(
         data_source_name=DataSource.BIBLIOTHECA,
         identifier_type=Identifier.BIBLIOTHECA_ID,
         with_license_pool=True, collection=self.collection
     )
     self.pool.open_access = False
     self.identifier = self.pool.identifier
     [self.delivery_mechanism] = self.pool.delivery_mechanisms
     self.patron = self._patron()
     self.analytics = MockAnalyticsProvider()
     self.circulation = MockCirculationAPI(
         self._db, self._default_library, analytics=self.analytics, api_map = {
             ExternalIntegration.BIBLIOTHECA : MockBibliothecaAPI
         }
     )
     self.remote = self.circulation.api_for_license_pool(self.pool)
 def setup(self):
     super(TestCirculationAPI, self).setup()
     self.collection = MockBibliothecaAPI.mock_collection(self._db)
     edition, self.pool = self._edition(
         data_source_name=DataSource.BIBLIOTHECA,
         identifier_type=Identifier.BIBLIOTHECA_ID,
         with_license_pool=True,
         collection=self.collection)
     self.pool.open_access = False
     self.identifier = self.pool.identifier
     [self.delivery_mechanism] = self.pool.delivery_mechanisms
     self.patron = self._patron()
     self.analytics = MockAnalyticsProvider()
     self.circulation = MockCirculationAPI(
         self._db,
         self._default_library,
         analytics=self.analytics,
         api_map={ExternalIntegration.BIBLIOTHECA: MockBibliothecaAPI})
     self.remote = self.circulation.api_for_license_pool(self.pool)
Exemplo n.º 3
0
 def setup(self):
     super(BibliothecaAPITest, self).setup()
     self.collection = MockBibliothecaAPI.mock_collection(self._db)
     self.api = MockBibliothecaAPI(self._db, self.collection)