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

    pids = m.pids()
    config['numprocesses'] = 2
    cmd = TestCommand("update", [config.to_dict()])
    ctl.process_command(cmd)
    m.manage("dummy")
    pids1 = m.pids()
    jobs = m.jobs()
    m.stop()
    m.run()

    assert isinstance(cmd.result, dict)
    assert cmd.result == {"ok": True}
    assert pids != pids1
    assert "default.dummy" in jobs
    assert len(pids) == 1
    assert len(pids1) == 2
dataset/ETHPy150Open benoitc/gaffer/test/test_controller.py/test_update/original