def test_multiple_flows_in_storage():
    s = Memory()
    f = Flow("test")
    g = Flow("other")
    z = Flow("not")
    s.add_flow(f)
    s.add_flow(g)

    assert "test" in s
    assert "other" in s
    assert "not" not in s

    assert s.get_flow("test") is f
    assert s.get_flow("other") is g

    assert s.flows["test"] is f
    assert s.flows["other"] is g
def test_get_flow_returns_flow():
    s = Memory()
    f = Flow("test")
    s.add_flow(f)
    runner = s.get_flow("test")
    assert runner is f
def test_get_flow_raises_if_flow_not_present():
    s = Memory()
    with pytest.raises(ValueError):
        s.get_flow("test")