Skip to content

Commit c41a507

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

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
@@ -116,11 +117,7 @@ async def __aexit__(self, *args: object) -> None:
116117
return None
117118

118119
async def aiter_sse(self) -> object:
119-
yield type(
120-
"SSE",
121-
(),
122-
{"event": "message", "data": "", "id": f"event-{reconnect_attempts}", "retry": 0},
123-
)()
120+
yield SimpleNamespace(event="message", data="", id=f"event-{reconnect_attempts}", retry=0)
124121

125122
def connect_sse(*args: object, **kwargs: object) -> PrimingOnlyEventSource:
126123
return PrimingOnlyEventSource()

0 commit comments

Comments
 (0)