def test_info():
    m, ctl, config = init()
    m.load(config)

    cmd = TestCommand("info", ["dummy"])
    ctl.process_command(cmd)

    m.scale("dummy", 2)
    time.sleep(0.1)

    cmd1 = TestCommand("info", ["dummy"])
    ctl.process_command(cmd1)

    m.stop()
    m.run()

    assert isinstance(cmd.result, dict)
    assert "info" in cmd.result
    info = cmd.result['info']
    assert info['name'] == "default.dummy"
    assert info['active'] == True
    assert info['running'] == 1
    assert info['max_processes'] == 1
    assert "config" in info
    assert info['config'] == config.to_dict()

    assert isinstance(cmd1.result, dict)
    assert "info" in cmd1.result
    info1 = cmd1.result['info']
    assert info1['name'] == "default.dummy"
    assert info1['running'] == 3
    assert info1['config'] == config.to_dict()
dataset/ETHPy150Open benoitc/gaffer/test/test_controller.py/test_info/original