def testShopClosed(self): self.repository.returnValues['shopClosed'] = True action = HarvestAction(self.repository, stateDir=self.tempdir, logDir=self.tempdir, generalHarvestLog=NilEventLogger()) action.do() self.assertEquals([], [m.name for m in self.harvester.calledMethods])
def testHarvestAction(self): self.harvester.returnValues['harvest'] = ('', False) action = HarvestAction(self.repository, stateDir=self.tempdir, logDir=self.tempdir, generalHarvestLog=NilEventLogger()) action.do() self.assertEquals(['harvest'], [m.name for m in self.harvester.calledMethods])