add unit tests
This commit is contained in:
@@ -68,6 +68,13 @@ async def test_rel_page(client):
|
|||||||
assert response.mimetype == 'text/html'
|
assert response.mimetype == 'text/html'
|
||||||
web.build_relative_urls = False
|
web.build_relative_urls = False
|
||||||
|
|
||||||
|
@pytest.mark.asyncio
|
||||||
|
async def test_notes(client):
|
||||||
|
"""Test the notes page route."""
|
||||||
|
response = await client.get('/notes')
|
||||||
|
assert response.status_code == 200
|
||||||
|
assert response.mimetype == 'text/html'
|
||||||
|
|
||||||
@pytest.mark.asyncio
|
@pytest.mark.asyncio
|
||||||
async def test_logging(client):
|
async def test_logging(client):
|
||||||
"""Test the logging page route."""
|
"""Test the logging page route."""
|
||||||
@@ -185,6 +192,15 @@ async def test_mqtt_fetch(client, create_inverter):
|
|||||||
assert response.status_code == 200
|
assert response.status_code == 200
|
||||||
|
|
||||||
|
|
||||||
|
@pytest.mark.asyncio
|
||||||
|
async def test_notes_fetch(client, config_conn):
|
||||||
|
"""Test the notes-fetch route."""
|
||||||
|
_ = create_inverter
|
||||||
|
|
||||||
|
response = await client.get('/notes-fetch')
|
||||||
|
assert response.status_code == 200
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.asyncio
|
@pytest.mark.asyncio
|
||||||
async def test_file_fetch(client, config_conn):
|
async def test_file_fetch(client, config_conn):
|
||||||
"""Test the data-fetch route."""
|
"""Test the data-fetch route."""
|
||||||
|
|||||||
Reference in New Issue
Block a user