22.3 Internal version bumps (#2419)
This commit is contained in:
@@ -164,11 +164,12 @@ def test_raw_headers(app):
|
||||
},
|
||||
)
|
||||
|
||||
assert request.raw_headers == (
|
||||
b"Host: example.com\r\nAccept: */*\r\nAccept-Encoding: gzip, "
|
||||
b"deflate\r\nConnection: keep-alive\r\nUser-Agent: "
|
||||
b"Sanic-Testing\r\nFOO: bar"
|
||||
)
|
||||
assert b"Host: example.com" in request.raw_headers
|
||||
assert b"Accept: */*" in request.raw_headers
|
||||
assert b"Accept-Encoding: gzip, deflate" in request.raw_headers
|
||||
assert b"Connection: keep-alive" in request.raw_headers
|
||||
assert b"User-Agent: Sanic-Testing" in request.raw_headers
|
||||
assert b"FOO: bar" in request.raw_headers
|
||||
|
||||
|
||||
def test_request_line(app):
|
||||
|
||||
@@ -254,7 +254,7 @@ def test_route_strict_slash(app):
|
||||
|
||||
|
||||
def test_route_invalid_parameter_syntax(app):
|
||||
with pytest.raises(ValueError):
|
||||
with pytest.raises(InvalidUsage):
|
||||
|
||||
@app.get("/get/<:str>", strict_slashes=True)
|
||||
def handler(request):
|
||||
|
||||
@@ -199,7 +199,7 @@ async def test_zero_downtime():
|
||||
for _ in range(40):
|
||||
async with httpx.AsyncClient(transport=transport) as client:
|
||||
r = await client.get("http://localhost/sleep/0.1")
|
||||
assert r.status_code == 200, r.content
|
||||
assert r.status_code == 200, r.text
|
||||
assert r.text == "Slept 0.1 seconds.\n"
|
||||
|
||||
def spawn():
|
||||
|
||||
Reference in New Issue
Block a user