Skip to content

Commit

Permalink
fix(sanic/tests): replace usage of response.stream
Browse files Browse the repository at this point in the history
This function was removed in sanic [v22.6.0](sanic-org/sanic#2487).

We can just use ResponseStream directly.
  • Loading branch information
Kyle-Verhoog committed Jun 30, 2022
1 parent 94b0770 commit 932dcf1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/contrib/sanic/test_sanic.py
Expand Up @@ -8,8 +8,8 @@
from sanic.config import DEFAULT_CONFIG
from sanic.exceptions import InvalidUsage
from sanic.exceptions import ServerError
from sanic.response import ResponseStream
from sanic.response import json
from sanic.response import stream
from sanic.response import text
from sanic.server import HttpProtocol

Expand Down Expand Up @@ -83,7 +83,7 @@ async def sample_streaming_fn(response):
await response.write("foo,")
await response.write("bar")

return stream(sample_streaming_fn, content_type="text/csv")
return ResponseStream(sample_streaming_fn, content_type="text/csv")

@app.route("/error400")
async def error_400(request):
Expand Down

0 comments on commit 932dcf1

Please sign in to comment.