Hi Prefect, Running a flow from another flow can ...
# ask-community
p
Hi Prefect, Running a flow from another flow can be done through
StartFlowRun
. However, this needs a flow being registered prior to calling
StartFlowRun.run()
, which requires Prefect Cloud or server to register the flow. Is there an alternative to use dependent flows when no prefect Cloud or Server is available (for example when running a unit-test testing the full flow and its dependent flows)?
k
Hi @Peter Roelants! I don’t really see any other than flow.run(). You can unit test tasks too with task.run().
p
Ok, thanks for verifying. I'll try mocking
StartFlowRun
to be able to test a full end-to-end test with dependent flows.