add mqtt-fetch test
This commit is contained in:
@@ -7,6 +7,7 @@ from gen3plus.inverter_g3p import InverterG3P
|
|||||||
from test_inverter_g3p import FakeReader, FakeWriter, config_conn
|
from test_inverter_g3p import FakeReader, FakeWriter, config_conn
|
||||||
from cnf.config import Config
|
from cnf.config import Config
|
||||||
from mock import patch
|
from mock import patch
|
||||||
|
from proxy import Proxy
|
||||||
import os, errno
|
import os, errno
|
||||||
|
|
||||||
pytest_plugins = ('pytest_asyncio',)
|
pytest_plugins = ('pytest_asyncio',)
|
||||||
@@ -174,6 +175,16 @@ async def test_language_unknown(client):
|
|||||||
assert response.mimetype == 'text/html'
|
assert response.mimetype == 'text/html'
|
||||||
|
|
||||||
|
|
||||||
|
@pytest.mark.asyncio
|
||||||
|
async def test_mqtt_fetch(client, create_inverter):
|
||||||
|
"""Test the mqtt-fetch route."""
|
||||||
|
_ = create_inverter
|
||||||
|
Proxy.class_init()
|
||||||
|
|
||||||
|
response = await client.get('/mqtt-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