add unit tests for all favicons
This commit is contained in:
@@ -21,6 +21,15 @@ async def test_page():
|
||||
assert response.status_code == 200
|
||||
assert response.mimetype == 'text/html'
|
||||
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_favicon96():
|
||||
"""Test the favicon-96x96.png route."""
|
||||
client = app.test_client()
|
||||
response = await client.get('/favicon-96x96.png')
|
||||
assert response.status_code == 200
|
||||
assert response.mimetype == 'image/png'
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_favicon():
|
||||
"""Test the favicon.ico route."""
|
||||
@@ -28,3 +37,27 @@ async def test_favicon():
|
||||
response = await client.get('/favicon.ico')
|
||||
assert response.status_code == 200
|
||||
assert response.mimetype == 'image/x-icon'
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_favicon_svg():
|
||||
"""Test the favicon.svg route."""
|
||||
client = app.test_client()
|
||||
response = await client.get('/favicon.svg')
|
||||
assert response.status_code == 200
|
||||
assert response.mimetype == 'image/svg+xml'
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_apple_touch_icon():
|
||||
"""Test the apple-touch-icon.png route."""
|
||||
client = app.test_client()
|
||||
response = await client.get('/apple-touch-icon.png')
|
||||
assert response.status_code == 200
|
||||
assert response.mimetype == 'image/png'
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_manifest():
|
||||
"""Test the site.webmanifest route."""
|
||||
client = app.test_client()
|
||||
response = await client.get('/site.webmanifest')
|
||||
assert response.status_code == 200
|
||||
assert response.mimetype == 'application/manifest+json'
|
||||
|
||||
Reference in New Issue
Block a user