Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes tests for httpx 0.23.2 #8032

Merged
merged 1 commit into from
Jan 3, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/prefect/client/orion.py
Original file line number Diff line number Diff line change
Expand Up @@ -1587,7 +1587,7 @@ async def read_flow_run_states(
of the flow run states
"""
response = await self._client.get(
"/flow_run_states/", params=dict(flow_run_id=flow_run_id)
"/flow_run_states/", params=dict(flow_run_id=str(flow_run_id))
)
return pydantic.parse_obj_as(List[prefect.states.State], response.json())

Expand Down Expand Up @@ -1753,7 +1753,7 @@ async def read_task_run_states(
a list of State model representations of the task run states
"""
response = await self._client.get(
"/task_run_states/", params=dict(task_run_id=task_run_id)
"/task_run_states/", params=dict(task_run_id=str(task_run_id))
)
return pydantic.parse_obj_as(List[prefect.states.State], response.json())

Expand Down
2 changes: 1 addition & 1 deletion tests/orion/api/test_flow_run_states.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ async def test_read_flow_run_state(
session,
):
response = await client.get(
"/flow_run_states/", params=dict(flow_run_id=flow_run.id)
"/flow_run_states/", params=dict(flow_run_id=str(flow_run.id))
)
assert response.status_code == status.HTTP_200_OK
response_state_ids = {state["id"] for state in response.json()}
Expand Down
2 changes: 1 addition & 1 deletion tests/orion/api/test_task_run_states.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ async def test_read_task_run_state_returns_404_if_does_not_exist(self, client):
class TestReadTaskRunStateByTaskRunId:
async def test_read_task_run_state(self, task_run, task_run_states, client):
response = await client.get(
"/task_run_states/", params=dict(task_run_id=task_run.id)
"/task_run_states/", params=dict(task_run_id=str(task_run.id))
)
assert response.status_code == status.HTTP_200_OK
response_state_ids = {state["id"] for state in response.json()}
Expand Down
4 changes: 2 additions & 2 deletions tests/test_engine.py
Original file line number Diff line number Diff line change
Expand Up @@ -629,7 +629,7 @@ def flaky_function():
assert await state.result() == 1

# Check expected state transitions
states = await orion_client.read_task_run_states(task_run.id)
states = await orion_client.read_task_run_states(str(task_run.id))
state_names = [state.type for state in states]
assert state_names == [
StateType.PENDING,
Expand Down Expand Up @@ -1098,7 +1098,7 @@ def flaky_function():
assert await state.result() == 1

# Check expected state transitions
states = await orion_client.read_flow_run_states(flow_run.id)
states = await orion_client.read_flow_run_states(str(flow_run.id))
state_names = [state.type for state in states]
assert state_names == [
StateType.PENDING,
Expand Down