Skip to content

Commit

Permalink
Replace TestClient with httpx.AsyncClient
Browse files Browse the repository at this point in the history
  • Loading branch information
mc-dorzo committed Dec 23, 2024
1 parent df2c195 commit 37a7af2
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tests/api/test_guidelines.py
Original file line number Diff line number Diff line change
Expand Up @@ -777,7 +777,7 @@ async def test_that_guideline_deletion_removes_tool_associations(


async def test_that_an_http_404_is_thrown_when_associating_with_a_nonexistent_local_tool_to_a_guideline(
client: TestClient,
async_client: httpx.AsyncClient,
container: Container,
agent_id: AgentId,
) -> None:
Expand All @@ -803,7 +803,7 @@ async def test_that_an_http_404_is_thrown_when_associating_with_a_nonexistent_lo
}
}

response = client.patch(
response = await async_client.patch(
f"/agents/{agent_id}/guidelines/{guideline.id}",
json=request_data,
)
Expand All @@ -812,7 +812,7 @@ async def test_that_an_http_404_is_thrown_when_associating_with_a_nonexistent_lo


async def test_that_an_http_404_is_thrown_when_associating_with_a_nonexistent_openapi_tool_to_a_guideline(
client: TestClient,
async_client: httpx.AsyncClient,
container: Container,
agent_id: AgentId,
) -> None:
Expand Down Expand Up @@ -847,7 +847,7 @@ async def test_that_an_http_404_is_thrown_when_associating_with_a_nonexistent_op
}
}

response = client.patch(
response = await async_client.patch(
f"/agents/{agent_id}/guidelines/{guideline.id}",
json=request_data,
)
Expand Down

0 comments on commit 37a7af2

Please sign in to comment.