MCPcopy Create free account
hub / github.com/pallets/flask / run_test

Function run_test

tests/test_basic.py:485–494  ·  view source on GitHub ↗
(expect_header)

Source from the content-addressed store, hash-verified

483 return str(flask.session.get("foo", 0))
484
485 def run_test(expect_header):
486 with app.test_client() as c:
487 assert c.get("/bump").data == b"1"
488 assert c.get("/bump").data == b"2"
489 assert c.get("/bump").data == b"3"
490
491 rv = c.get("/read")
492 set_cookie = rv.headers.get("set-cookie")
493 assert (set_cookie is not None) == expect_header
494 assert rv.data == b"3"
495
496 is_permanent = True
497 app.config["SESSION_REFRESH_EACH_REQUEST"] = True

Callers 1

Calls 2

test_clientMethod · 0.80
getMethod · 0.45

Tested by

no test coverage detected