A Request can be instantiated with a scope, and presents a `Mapping` interface.
()
| 193 | |
| 194 | |
| 195 | def test_request_scope_interface() -> None: |
| 196 | """ |
| 197 | A Request can be instantiated with a scope, and presents a `Mapping` |
| 198 | interface. |
| 199 | """ |
| 200 | request = Request({"type": "http", "method": "GET", "path": "/abc/"}) |
| 201 | assert request["method"] == "GET" |
| 202 | assert dict(request) == {"type": "http", "method": "GET", "path": "/abc/"} |
| 203 | assert len(request) == 3 |
| 204 | |
| 205 | |
| 206 | def test_request_raw_path(test_client_factory: TestClientFactory) -> None: |