MCPcopy Create free account
hub / github.com/Azure-Samples/rag-postgres-openai-python / test_favicon

Function test_favicon

tests/test_frontend_routes.py:22–32  ·  view source on GitHub ↗

test the favicon route

(test_client)

Source from the content-addressed store, hash-verified

20
21@pytest.mark.asyncio
22async 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

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected