|
9 | 9 |
|
10 | 10 | import pytest |
11 | 11 | from fastapi import HTTPException |
12 | | -from ogx_api.openai_responses import ( |
13 | | - OpenAIResponseMessage as ResponseMessage, |
14 | | -) |
15 | 12 | from ogx_client import APIStatusError |
16 | 13 | from pydantic_ai import AgentRunResultEvent |
17 | 14 | from pydantic_ai.exceptions import AgentRunError |
@@ -118,10 +115,6 @@ def blocked_moderation_fixture() -> ShieldModerationBlocked: |
118 | 115 | return ShieldModerationBlocked( |
119 | 116 | message="Content blocked by shield.", |
120 | 117 | moderation_id="modr-test-456", |
121 | | - refusal_response=ResponseMessage( |
122 | | - role="assistant", |
123 | | - content="Content blocked by shield.", |
124 | | - ), |
125 | 118 | ) |
126 | 119 |
|
127 | 120 |
|
@@ -1055,9 +1048,9 @@ async def __aexit__(self, *_args: object) -> None: |
1055 | 1048 | num_chunks = len(chunk_ids) |
1056 | 1049 | assert chunk_ids == sorted(chunk_ids), "chunk_ids must be monotonically ordered" |
1057 | 1050 | assert all(cid >= 0 for cid in chunk_ids), "all chunk_ids must be non-negative" |
1058 | | - assert num_chunks == len( |
1059 | | - set(chunk_ids) |
1060 | | - ), "chunk_ids must not contain duplicates" |
| 1051 | + assert num_chunks == len(set(chunk_ids)), ( |
| 1052 | + "chunk_ids must not contain duplicates" |
| 1053 | + ) |
1061 | 1054 | assert chunk_ids[-1] == num_chunks - 1 |
1062 | 1055 |
|
1063 | 1056 | @pytest.mark.asyncio |
|
0 commit comments