MCPcopy Create free account
hub / github.com/pallets/quart / test_set_cookie

Function test_set_cookie

tests/test_testing.py:340–350  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

338
339
340async def test_set_cookie() -> None:
341 app = Quart(__name__)
342
343 @app.route("/", methods=["GET"])
344 async def echo() -> Response:
345 return jsonify({"foo": request.cookies.get("foo")})
346
347 client = Client(app)
348 client.set_cookie("localhost", "foo", "bar")
349 response = await client.get("/")
350 assert (await response.get_json()) == {"foo": "bar"}
351
352
353async def test_websocket_bad_request() -> None:

Callers

nothing calls this directly

Calls 4

QuartClass · 0.90
set_cookieMethod · 0.45
getMethod · 0.45
get_jsonMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…