S allius/issue387 (#388)
* add optional java script to fetch data regullary * change file extension to `html.j2` for templates * fix route for fetch data - for running in iframes (e.g. HA ingress) we must use relative path in the URLs * increase test coverage * remove unused statements
This commit is contained in:
@@ -61,3 +61,13 @@ async def test_manifest():
|
||||
response = await client.get('/site.webmanifest')
|
||||
assert response.status_code == 200
|
||||
assert response.mimetype == 'application/manifest+json'
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_data_fetch():
|
||||
"""Test the healthy route."""
|
||||
client = app.test_client()
|
||||
response = await client.get('/data-fetch')
|
||||
assert response.status_code == 200
|
||||
|
||||
response = await client.get('/data-fetch')
|
||||
assert response.status_code == 200
|
||||
|
||||
Reference in New Issue
Block a user