https://prefect.io logo
p

Pedro Martins

11/10/2021, 6:34 PM
Another question, how can I spin up a prefect server just to run unit-tests? Is there any fixture that does this for me?
k

Kevin Kho

11/10/2021, 6:36 PM
For this one, not really. You’d really need to spin up and change the backend with
prefect backend server
to run the unit tests
But you can unit test a bunch of things without the server. The hard ones are the ones with API calls like the
StartFlowRun
task.
p

Pedro Martins

11/10/2021, 6:38 PM
StartFlowRun
get the client from the context?
atm I’m using the client.register and client.create_flow_run to manage flows. Why should I use
StartFlowRun
?
k

Kevin Kho

11/10/2021, 6:41 PM
Yes it does . You don’t need to. I’m just saying that’s an example of a task that really requires a server to test, But you can test a bunch of other things without a Server up
p

Pedro Martins

11/10/2021, 6:43 PM
🔝
2 Views