def test_unblock_flow():
    pm = ProcessManager()

    class TestProcess1(Process):
        def definition(self, user, **kwargs):
            va = True

    pm.attach_process(TestProcess1)

    class TestProcess2(Process):
        def definition(self, user, **kwargs):
            bene = True

    pm.attach_process(TestProcess2)

    pm.block_flow()
    pm.unblock_flow()
    pm.set_flow(sequence=('TestProcess1', 'TestProcess2'))
def test_block_flow():
    pm = ProcessManager()

    class TestProcess1(Process):
        def definition(self, user, **kwargs):
            va = True

    pm.attach_process(TestProcess1)

    class TestProcess2(Process):
        def definition(self, user, **kwargs):
            bene = True

    pm.attach_process(TestProcess2)

    pm.block_flow()

    with pytest.raises(ValueError):
        assert pm.set_flow(sequence=('TestProcess1', 'TestProcess2'))