def __init__(self): self.d = DockerBackend() self.loop, self.ui = get_app_in_loop(PALLETE) self.ui.commander = Commander(self.ui, self.d) self.rt_thread = threading.Thread(target=self.realtime_updates, daemon=True) self.rt_thread.start()
def test_commander(): com = Commander(None, None) c = com.get_command("test test-arg") assert c.arguments.test_arg is True assert c.run() == 42
def test_command_aliases(): com = Commander(None, None) c = com.get_command("mango x") assert c.arguments.test_opt is True assert c.run() == 42