(server)
| 70 | |
| 71 | |
| 72 | def test_redirects(server): |
| 73 | url = str(server.url.copy_with(path="/redirect_301")) |
| 74 | runner = CliRunner() |
| 75 | result = runner.invoke(httpx.main, [url]) |
| 76 | assert result.exit_code == 1 |
| 77 | assert remove_date_header(splitlines(result.output)) == [ |
| 78 | "HTTP/1.1 301 Moved Permanently", |
| 79 | "server: uvicorn", |
| 80 | "location: /", |
| 81 | "Transfer-Encoding: chunked", |
| 82 | "", |
| 83 | ] |
| 84 | |
| 85 | |
| 86 | def test_follow_redirects(server): |
nothing calls this directly
no test coverage detected