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])
    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 newHarvestAction(self):
     self.state = State(self.tmp_path / 'state', self.tmp_path / 'log',
                        self.repository.id)
     return HarvestAction(self.repository,
                          state=self.state,
                          generalHarvestLog=NilEventLogger())