def test_resumption_nonexact(self): myserver = server.BatchingResumption(self._fakeserver, 13) self._listIdentifiers(myserver, 13)
def test_resumption_overflow(self): myserver = server.BatchingResumption(self._fakeserver, 300) result, token = myserver.listIdentifiers(metadataPrefix='oai_dc') self.assert_(token is None) self.assertEquals([str(i) for i in range(100)], [header.identifier() for header in result])
def setUp(self): self._fakeserver = fakeserver.BatchingFakeServer() self._server = server.BatchingResumption(self._fakeserver, 10)