Exemplo n.º 1
0
 def setUp(self):
     ActionTestCase.setUp(self)
     self.repo = Repository('domainId', 'rep')
     self.uploader = CallTrace('Uploader')
     self.repo.createUploader = lambda logger: self.uploader
     self.stateDir = self.tempdir
     self.logDir = self.tempdir
     self.smoothaction = SmoothAction(self.repo, self.stateDir, self.logDir, NilEventLogger())
     self.idfilename = join(self.stateDir, 'rep.ids')
     self.invalidIdsFilename = join(self.stateDir, 'rep_invalid.ids')
     self.old_idfilename = join(self.stateDir, 'rep.ids.old')
     self.statsfilename = join(self.stateDir,'rep.stats')
Exemplo n.º 2
0
 def setUp(self):
     ActionTestCase.setUp(self)
     self.repo = Repository('domainId', 'rep')
     self.uploader = CallTrace('Uploader')
     self.repo.createUploader = lambda logger: self.uploader
     self.stateDir = self.tmp_path / 'state'
     self.logDir = self.tmp_path / 'log'
     self.state = State(self.stateDir, self.logDir, 'rep')
     self.smoothaction = SmoothAction(self.repo, self.state, NilEventLogger())
     self.idfilename = join(self.stateDir, 'rep.ids')
     self.invalidIdsFilename = join(self.stateDir, 'rep_invalid.ids')
     self.old_idfilename = join(self.stateDir, 'rep.ids.old')
     self.statsfilename = join(self.stateDir,'rep.stats')
Exemplo n.º 3
0
 def tearDown(self):
     HarvestAction._createHarvester = self._original_createHarvester
     ActionTestCase.tearDown(self)
Exemplo n.º 4
0
 def setUp(self):
     ActionTestCase.setUp(self)
     self.harvester = CallTrace("Harvester")
     self._original_createHarvester = HarvestAction._createHarvester
     HarvestAction._createHarvester = lambda instance: self.harvester
Exemplo n.º 5
0
 def tearDown(self):
     HarvestAction._createHarvester = self._original_createHarvester
     self.state is not None and self.state.close()
     ActionTestCase.tearDown(self)
Exemplo n.º 6
0
 def setUp(self):
     ActionTestCase.setUp(self)
     self.harvester = CallTrace("Harvester")
     self._original_createHarvester = HarvestAction._createHarvester
     self.state = None
     HarvestAction._createHarvester = lambda instance: ([], self.harvester)