def do_test_reconfigService(self, old, old_port, new, new_port): old.master = self.master if old_port: self.old_registration = old.registration = \ pbmanager.FakeRegistration(self.master.pbmanager, old_port, old.slavename) old.registered_port = old_port old.missing_timer = mock.Mock(name='missing_timer') yield old.startService() new_config = mock.Mock() new_config.protocols = {'pb': {'port': new_port}} new_config.slaves = [new] yield old.reconfigService(new_config)
def do_test_reconfigService(self, old, old_port, new, new_port): master = self.master = fakemaster.make_master() old.master = master if old_port: self.old_registration = old.registration = \ pbmanager.FakeRegistration(master.pbmanager, old_port, old.slavename) old.registered_port = old_port old.missing_timer = mock.Mock(name='missing_timer') old.startService() new_config = mock.Mock() new_config.slavePortnum = new_port new_config.slaves = [new] yield old.reconfigService(new_config)