(http_scope: HTTPScope)
| 91 | |
| 92 | |
| 93 | async def test_has_request_context(http_scope: HTTPScope) -> None: |
| 94 | app = Quart(__name__) |
| 95 | headers, path, query_string = make_test_headers_path_and_query_string(app, "/") |
| 96 | request = Request( |
| 97 | "GET", |
| 98 | "http", |
| 99 | path, |
| 100 | query_string, |
| 101 | headers, |
| 102 | "", |
| 103 | "1.1", |
| 104 | http_scope, |
| 105 | send_push_promise=no_op_push, |
| 106 | ) |
| 107 | async with RequestContext(Quart(__name__), request): |
| 108 | assert has_request_context() is True |
| 109 | assert has_app_context() is True |
| 110 | assert has_request_context() is False |
| 111 | assert has_app_context() is False |
| 112 | |
| 113 | |
| 114 | async def test_has_app_context() -> None: |
nothing calls this directly
no test coverage detected
searching dependent graphs…