test the favicon route
(test_client)
| 20 | |
| 21 | @pytest.mark.asyncio |
| 22 | async def test_favicon(test_client): |
| 23 | """test the favicon route""" |
| 24 | response = test_client.get("/favicon.ico") |
| 25 | |
| 26 | favicon_file_path = "src/backend/static/favicon.ico" |
| 27 | with open(favicon_file_path, "rb") as f: |
| 28 | favicon_file = f.read() |
| 29 | |
| 30 | assert response.status_code == 200 |
| 31 | assert response.headers["Content-Length"] == str(len(favicon_file)) |
| 32 | assert favicon_file == response.content |
| 33 | |
| 34 | |
| 35 | @pytest.mark.asyncio |
nothing calls this directly
no outgoing calls
no test coverage detected