def setUp(self): r = FakeRequest() r.sources = [FakeSource()] r.sources[0].changes = [FakeChange()] r.sources[0].revision = "12345" self.request = r self.master = FakeMaster() self.master.botmaster = FakeBotMaster(master=self.master) self.builder = self.createBuilder() self.build = Build([r]) self.build.setBuilder(self.builder)
def setUp(self): r = FakeRequest() r.sources = [FakeSource()] r.sources[0].changes = [FakeChange()] r.sources[0].revision = "12345" self.request = r self.master = fakemaster.make_master(wantData=True, testcase=self) self.master.botmaster = FakeBotMaster(master=self.master) self.slave = slave.FakeSlave(self.master) self.slave.attached(None) self.builder = FakeBuilder(self.master) self.build = Build([r]) self.build.conn = fakeprotocol.FakeConnection(self.master, self.slave) self.slavebuilder = Mock(name='slavebuilder') self.slavebuilder.slave = self.slave self.build.setBuilder(self.builder)