From 20b6beba49bf9b2c546080fc4a89d223c93a93fa Mon Sep 17 00:00:00 2001 From: Stefan Allius Date: Sun, 22 Jun 2025 11:59:27 +0200 Subject: [PATCH] set app.testing to get exceptions during test --- app/tests/test_server.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/tests/test_server.py b/app/tests/test_server.py index 7b0e934..1d94148 100644 --- a/app/tests/test_server.py +++ b/app/tests/test_server.py @@ -191,6 +191,7 @@ class TestApp: """Test the ready route.""" ProxyState.set_up(False) + app.testing = True client = app.test_client() response = await client.get('/-/ready') assert response.status_code == 503 @@ -211,6 +212,7 @@ class TestApp: with InverterBase(reader, writer, 'tsun', Talent): ProxyState.set_up(False) + app.testing = True client = app.test_client() response = await client.get('/-/healthy') assert response.status_code == 200 @@ -240,6 +242,7 @@ class TestApp: with caplog.at_level(logging.INFO) and InverterBase(reader, writer, 'tsun', Talent): ProxyState.set_up(False) + app.testing = True client = app.test_client() response = await client.get('/-/healthy') assert response.status_code == 200 @@ -271,6 +274,7 @@ class TestApp: with caplog.at_level(logging.INFO) and InverterBase(reader, writer, 'tsun', Talent): ProxyState.set_up(False) + app.testing = True client = app.test_client() response = await client.get('/-/healthy') assert response.status_code == 200