Пример #1
0
    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])
Пример #2
0
    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])