Skip to content

Commit e39f069

Browse files
author
Jianke LIN
committed
test(streamable-http): keep reconnect fake covered
1 parent 9e33664 commit e39f069

1 file changed

Lines changed: 2 additions & 5 deletions

File tree

tests/client/test_streamable_http.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
import json
1111
from collections.abc import AsyncIterator, Callable, Mapping
1212
from typing import Any
13+
from types import SimpleNamespace
1314

1415
import anyio
1516
import httpx
@@ -122,11 +123,7 @@ async def __aexit__(self, *args: object) -> None:
122123
return None
123124

124125
async def aiter_sse(self) -> object:
125-
yield type(
126-
"SSE",
127-
(),
128-
{"event": "message", "data": "", "id": f"event-{reconnect_attempts}", "retry": 0},
129-
)()
126+
yield SimpleNamespace(event="message", data="", id=f"event-{reconnect_attempts}", retry=0)
130127

131128
def connect_sse(*args: object, **kwargs: object) -> PrimingOnlyEventSource:
132129
return PrimingOnlyEventSource()

0 commit comments

Comments
 (0)