(http_scope: HTTPScope)
| 70 | |
| 71 | |
| 72 | async def test_after_this_request(http_scope: HTTPScope) -> None: |
| 73 | app = Quart(__name__) |
| 74 | headers, path, query_string = make_test_headers_path_and_query_string(app, "/") |
| 75 | async with RequestContext( |
| 76 | Quart(__name__), |
| 77 | Request( |
| 78 | "GET", |
| 79 | "http", |
| 80 | path, |
| 81 | query_string, |
| 82 | headers, |
| 83 | "", |
| 84 | "1.1", |
| 85 | http_scope, |
| 86 | send_push_promise=no_op_push, |
| 87 | ), |
| 88 | ) as context: |
| 89 | after_this_request(lambda: "hello") # type: ignore |
| 90 | assert context._after_request_functions[0]() == "hello" # type: ignore |
| 91 | |
| 92 | |
| 93 | async def test_has_request_context(http_scope: HTTPScope) -> None: |
nothing calls this directly
no test coverage detected
searching dependent graphs…