(scope: Scope, receive: Receive, send: Send)
| 176 | |
| 177 | |
| 178 | async def redirect_301(scope: Scope, receive: Receive, send: Send) -> None: |
| 179 | await send( |
| 180 | {"type": "http.response.start", "status": 301, "headers": [[b"location", b"/"]]} |
| 181 | ) |
| 182 | await send({"type": "http.response.body"}) |
| 183 | |
| 184 | |
| 185 | @pytest.fixture(scope="session") |