def test_simple(): o = options.Options() m = controller.Master(o) a = addons.Addons(m) a.add(o, TAddon("one")) assert a.get("one") assert not a.get("two")
def __init__(self, opts, server): self.options = opts or options.Options() self.addons = addons.Addons(self) self.event_queue = queue.Queue() self.should_exit = threading.Event() self.server = server channel = controller.Channel(self.event_queue, self.should_exit) server.set_channel(channel)
def __init__(self, opts, *servers): self.options = opts or options.Options() self.addons = addons.Addons(self) self.event_queue = queue.Queue() self.should_exit = threading.Event() self.servers = [] for i in servers: self.add_server(i)
def test_simple(): o = options.Options() m = master.Master(o, proxy.DummyServer(o)) a = addons.Addons(m) a.add(TAddon("one")) assert a.get("one") assert not a.get("two") a.clear() assert not a.chain