Will
10/20/2023, 2:22 PMPyTest
when trying to build an end to end test on a newly deployed prefect flow.
With this code:
from prefect.deployments import run_deployment
def test_flow_deployment(flow_name: str) -> None:
deployment = run_deployment(name = flow_name)
When I run it through PyTest (e.g. pytest my_prefect_test.py
) I get the following error:
except httpx.HTTPStatusError as e:
if e.response.status_code == status.HTTP_404_NOT_FOUND:
> raise prefect.exceptions.ObjectNotFound(http_exc=e) from e
E prefect.exceptions.ObjectNotFound
However, when I run python my_prefect_test.py
in the same terminal, there are no errors and the SDK call successfully reaches the prefect cloud and sets off a flow.
Does anybody have any ideas?
Prefect version 2.12.4
Dominic Tarro
10/20/2023, 2:27 PMDominic Tarro
10/20/2023, 2:30 PMWill
10/20/2023, 2:32 PMprefect_test_harness