def setUp(self): step = self.build_step_status = mock.Mock(name='build_step_status') self.basedir = step.build.builder.basedir = os.path.abspath('basedir') self.setUpDirs(self.basedir) self.logfile = logfile.LogFile(step, 'testlf', '123-stdio') self.master = self.logfile.master = mock.Mock() self.config = self.logfile.master.config = config.MasterConfig()
def makeLogFile(self, name='n', logfilename='nLog'): # this is one reason this interface sucks: parent = mock.Mock(name='fake StepStatus') parent.build.builder.basedir = 'basedir' return logfile.LogFile(parent, name, logfilename)