Skip to content

Commit

Permalink
Test a comment
Browse files Browse the repository at this point in the history
  • Loading branch information
mmastrac committed Oct 29, 2024
1 parent a08182a commit ef85781
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions tests/test_http.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,8 @@ async def test_bad_url(self):
await client.get("httpx://uh-oh")

async def test_immediate_connection_drop(self):
"""Test handling of a connection that is dropped immediately by the server"""
"""Test handling of a connection that is dropped immediately by the
server"""

async def mock_drop_server(
_reader: asyncio.StreamReader, writer: asyncio.StreamWriter
Expand All @@ -142,7 +143,8 @@ async def mock_drop_server(
await server.wait_closed()

async def test_immediate_connection_drop_streaming(self):
"""Test handling of a connection that is dropped immediately by the server"""
"""Test handling of a connection that is dropped immediately by the
server"""

async def mock_drop_server(
_reader: asyncio.StreamReader, writer: asyncio.StreamWriter
Expand Down Expand Up @@ -206,6 +208,9 @@ async def mock_sse_server(
await writer.drain()

for i in range(3):
writer.write(b": test comment that should be ignored\n\n")
await writer.drain()

writer.write(
f"event: message\ndata: Event {i + 1}\n\n".encode()
)
Expand Down

0 comments on commit ef85781

Please sign in to comment.