Ejemplo n.º 1
0
    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()
Ejemplo n.º 2
0
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
Ejemplo n.º 3
0
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
Ejemplo n.º 4
0
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