From c5f25b5728437f92c2920e2ed1362c018296cf8c Mon Sep 17 00:00:00 2001 From: Stefan Allius Date: Sat, 3 May 2025 22:58:15 +0200 Subject: [PATCH] add mqtt-fetch test --- app/tests/test_web_route.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/app/tests/test_web_route.py b/app/tests/test_web_route.py index 89abd8e..cf5f307 100644 --- a/app/tests/test_web_route.py +++ b/app/tests/test_web_route.py @@ -7,6 +7,7 @@ from gen3plus.inverter_g3p import InverterG3P from test_inverter_g3p import FakeReader, FakeWriter, config_conn from cnf.config import Config from mock import patch +from proxy import Proxy import os, errno pytest_plugins = ('pytest_asyncio',) @@ -174,6 +175,16 @@ async def test_language_unknown(client): 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 async def test_file_fetch(client, config_conn): """Test the data-fetch route."""